benjamine / jsondiffpatch

Diff & patch JavaScript objects
MIT License
4.85k stars 472 forks source link

Broken on Internet Explorer 11: 'Symbol' is undefined #222

Closed JoshuaKGoldberg closed 6 years ago

JoshuaKGoldberg commented 6 years ago

Your README.md claims IE8+... 😦

https://benjamine.github.io/jsondiffpatch/test/index.html

passes: 374\t\tfailures: 3\t\tduration: 1.60s
DiffPatcher > plugins > getting pipe filter list

✖ returns builtin filters 
‣
ReferenceError: 'Symbol' is undefined
   at list (https://cdn.jsdelivr.net/npm/jsondiffpatch/dist/jsondiffpatch.umd.test.js:2403:36)
   at Anonymous function (https://cdn.jsdelivr.net/npm/jsondiffpatch/dist/jsondiffpatch.umd.test.js:16119:9)

removing and replacing pipe filters
✖ removes specified filter 
‣
ReferenceError: 'Symbol' is undefined
   at list (https://cdn.jsdelivr.net/npm/jsondiffpatch/dist/jsondiffpatch.umd.test.js:2403:36)
   at Anonymous function (https://cdn.jsdelivr.net/npm/jsondiffpatch/dist/jsondiffpatch.umd.test.js:16184:9)

✖ replaces specified filter 
‣
ReferenceError: 'Symbol' is undefined
   at list (https://cdn.jsdelivr.net/npm/jsondiffpatch/dist/jsondiffpatch.umd.test.js:2403:36)
   at Anonymous function (https://cdn.jsdelivr.net/npm/jsondiffpatch/dist/jsondiffpatch.umd.test.js:16194:9)
JoshuaKGoldberg commented 6 years ago

Fixed locally with require("es6-symbol/implement");.

benjamine commented 6 years ago

thanks @JoshuaKGoldberg (since testling went down I've lost discipline in checking IE versions :( ) I've found Symbol is a dependency babel introduces to implement for of and array destructuring, there were just 2 cases of that, and I think those are 2 ES6 features to avoid anyway.

I just published 0.3.9 which shouldn't depend on Symbol anymore.