Closed disnet closed 7 years ago
Even modern browsers like Safari 10 apparently have problems with const in eval so just don't use ES2015 features.
The minimal repro for those interested. Throws a reference error in safari 10 (and tech preview). Same in recent-ish chrome too I think.
eval(` const a = 1; function f() { console.log(a); }; f()');
Even modern browsers like Safari 10 apparently have problems with const in eval so just don't use ES2015 features.
The minimal repro for those interested. Throws a reference error in safari 10 (and tech preview). Same in recent-ish chrome too I think.