catc / react-timekeeper

Google Keep app inspired time picker for react :clock4:
https://catc.github.io/react-timekeeper
MIT License
696 stars 67 forks source link

IE Bug caused by React Spring #44

Closed theaceofthespade closed 4 years ago

theaceofthespade commented 4 years ago

I'm getting an error in IE due to the way that the React Spring is imported - I believe this is actually a bug with the version of React Spring, as referenced here: https://github.com/react-spring/react-spring/issues/552

The error is: SCRIPT1002: Syntax error

And the offending un-transpiled lines (specifically the arrow functions) are: ` const is = { arr: Array.isArray, obj: a => Object.prototype.toString.call(a) === '[object Object]', fun: a => typeof a === 'function', str: a => typeof a === 'string', num: a => typeof a === 'number', und: a => a === void 0, nul: a => a === null, set: a => a instanceof Set, map: a => a instanceof Map,

equ(a, b) { if (typeof a !== typeof b) return false; if (is.str(a) || is.num(a)) return a === b; if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true; let i;

for (i in a) if (!(i in b)) return false;

for (i in b) if (a[i] !== b[i]) return false;

return is.und(i) ? a === b : true;

}

}; `

catc commented 4 years ago

I'm not actively supporting IE 11 and under.

Couldn't this be fixed by adding a build step in your workflow to transpile everything (including dependent libraries) to support older environments?

TheRusskiy commented 3 years ago

@theaceofthespade in case you still need it I published react-timekeeper-compat which is a fork of this repo but with IE11 compatibility