diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-09-07 10:43:36 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-09-07 10:43:36 -0400 |
commit | df9adfbb4a3ab15f0f2708b06621dabadba85aac (patch) | |
tree | 081e0cc1bd0034443c58c08ec0e797d31af325bd | |
parent | 268a4e0b252b0d3f59645e937293ac4cb65cce83 (diff) |
[bug] try/catch non standard statements
-rw-r--r-- | src/leap/bitmask/core/web/bitmask.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/leap/bitmask/core/web/bitmask.js b/src/leap/bitmask/core/web/bitmask.js index ae209512..fedd5fcd 100644 --- a/src/leap/bitmask/core/web/bitmask.js +++ b/src/leap/bitmask/core/web/bitmask.js @@ -28,7 +28,11 @@ * strings. */ -import "babel-polyfill"; +try { + // Use Promises in non-ES6 compliant engines. + eval('import "babel-polyfill";') +} +catch (err) {} var bitmask = function(){ var event_handlers = {}; @@ -297,4 +301,6 @@ var bitmask = function(){ }; }(); -module.exports = bitmask +try { + module.exports = bitmask +} catch(err) {} |