mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Correctly feature detect WeakMap.
This commit is contained in:
parent
9c7320e26a
commit
5dd4db7676
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ importScripts("/javascripts/lodash.js", "/javascripts/aether.js");
|
|||
|
||||
try {
|
||||
//Detect very modern javascript support.
|
||||
(0,eval("'use strict'; let test = (class Test { *gen(a=7) { yield yield * () => WeakMap; } });"));
|
||||
(0,eval("'use strict'; let test = WeakMap && (class Test { *gen(a=7) { yield yield * () => true ; } });"));
|
||||
console.log("Modern javascript detected, aw yeah!");
|
||||
self.importScripts('/javascripts/esper.modern.js');
|
||||
} catch (e) {
|
||||
|
|
|
@ -66,7 +66,7 @@ self.console = console;
|
|||
self.importScripts('/javascripts/lodash.js', '/javascripts/world.js', '/javascripts/aether.js');
|
||||
try {
|
||||
//Detect very modern javascript support.
|
||||
(0,eval("'use strict'; let test = (class Test { *gen(a=7) { yield yield * () => WeakMap; } });"));
|
||||
(0,eval("'use strict'; let test = WeakMap && (class Test { *gen(a=7) { yield yield * () => true ; } });"));
|
||||
console.log("Modern javascript detected, aw yeah!");
|
||||
self.importScripts('/javascripts/esper.modern.js');
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue