Skip to content

Commit

Permalink
fix(examples): fix IE11 compatibility for e-commerce demo (#4049)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickcr committed Aug 19, 2019
1 parent 9776b16 commit dc6f350
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions examples/e-commerce/src/ui.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const filtersButtons = [
...document.querySelectorAll('[data-action="open-overlay"]'),
];
const closeOverlayButtons = [
...document.querySelectorAll('[data-action="close-overlay"]'),
];
const filtersButtons = Array.prototype.slice.call(
document.querySelectorAll('[data-action="open-overlay"]')
);
const closeOverlayButtons = Array.prototype.slice.call(
document.querySelectorAll('[data-action="close-overlay"]')
);
const header = document.querySelector('#header');
const resultsContainer = document.querySelector('.container-results');

Expand Down
2 changes: 1 addition & 1 deletion examples/e-commerce/src/widgets/HitsPerPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const hitsPerPage = hitsPerPageWidget({
export function getFallbackHitsPerPageRoutingValue(
hitsPerPageValue: string
): string | undefined {
if (items.map(item => item.value).includes(Number(hitsPerPageValue))) {
if (items.map(item => item.value).indexOf(Number(hitsPerPageValue)) !== -1) {
return hitsPerPageValue;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/e-commerce/src/widgets/SortBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const sortBy = sortByWidget({
export function getFallbackSortByRoutingValue(
sortByValue: string
): string | undefined {
if (items.map(item => item.value).includes(sortByValue)) {
if (items.map(item => item.value).indexOf(sortByValue) !== -1) {
return sortByValue;
}

Expand Down

0 comments on commit dc6f350

Please sign in to comment.