6

I've recently integrated Algolia search for a client, and it has come to my attention that it currently doesn't work for any IE based browsers.

Below is an example of the code, we're using and the library files we're including. I've tried multiple things, including polyfill. But hasn't seemed to have done the trick.

const search = instantsearch({
        indexName: 'index',
        searchClient: algoliasearch('KEY', 'PAIR')
    })

    search.addWidgets([
        instantsearch.widgets.configure({
            disjunctiveFacetsRefinements: {
                lang: ['en-gb']
            }
        }),

        instantsearch.widgets.pagination({
            container: '#pagination'
        }),

        instantsearch.widgets.searchBox({
            container: '#searchbox',
            placeholder: 'Start typing to search..',
            cssClasses: {
                root: 'search-form'
            },
        }),

        instantsearch.widgets.hits({
            container: '#hits',
            templates: {
                item:
                    '<a href="{{ url }}"><h2>{{#helpers.highlight}}{ "attribute": "title" }{{/helpers.highlight}}</h2></a><p>{{ description }}</p>',
            },
        })
    ]);

    search.start();

We're including these two files for the search

<script src="https://cdn.jsdelivr.net/npm/algoliasearch@4.0.0/dist/algoliasearch-lite.umd.js"
        type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/instantsearch.js@4.0.0/dist/instantsearch.production.min.js"
        type="text/javascript"></script>

The console error we get is also

Uncaught, unspecified "error" event. ([object, object])
File: instantsearch.production.min.js, Line: 2, Column: 31593

Any ideas?

NicolJamie
  • 61
  • 1

0 Answers0