Manually added refinement facet works but shows error?


I have added an “invisible” refinementFacet I added via javascript. Everything works but still there is a error shown in the console:
Cannot read property 'facets' of undefined

What i’ve done is:

const search = instantsearch({
    appId: '****',
    apiKey: '****',
    indexName: '****',
    searchFunction: function(helper) {
        toppers.helper.state.disjunctiveFacets = ["bannerpakket"];
        toppers.helper.state.disjunctiveFacetsRefinements = {bannerpakket:["1"]}; // THIS LINE WORKS BUT GIVES THE ERROR;;
    routing: false

const toppers = instantsearch({
    appId: '****',
    apiKey: '****',
    indexName: '****',
    searchParameters: {
        hitsPerPage: 12

Am i missing something? I even tested to add a real widget which also works and the filter even is checked with the correct value, but still the error is shown in console.

On the toppers instance itself, you can use configure to hardcode these parameters:

    disjunctiveFacetsRefinements: { bannerpakket: ['1'] },

Maybe I’m missing what you are trying to achieve though. Can you explain a bit more in detail what the goal is?

Thanks. That seems to work yes!