Commit fab66bc
fix(Template): harden Symbol checks (#2749)
If a `Symbol` polyfill is present, the instantsearch script presumes
that `Symbol` is fully implemented. However, `Symbol` polyfills cannot
replicate the behavior fully.
This causes the instantsearch script to error out and cause problems on
the page if a `Symbol` polyfill is used.
This commit hardens the `Symbol` checks to make sure real `Symbol`s are
supported, not just a polyfill.
NOTE: The google maps API library is a common library that implements a
`Symbol` polyfill.
@see:
* https://stackoverflow.com/questions/48532850/is-google-maps-js-library-polyfilling-symbol
* https://stackoverflow.com/questions/39803281/get-typeof-of-the-value-in-es6#398052401 parent 8dd0b18 commit fab66bc
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
371 | 374 | | |
372 | 375 | | |
373 | 376 | | |
| |||
0 commit comments