summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-09-07 10:43:36 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-09-07 10:43:36 -0400
commitdf9adfbb4a3ab15f0f2708b06621dabadba85aac (patch)
tree081e0cc1bd0034443c58c08ec0e797d31af325bd /src/leap/bitmask/core
parent268a4e0b252b0d3f59645e937293ac4cb65cce83 (diff)
[bug] try/catch non standard statements
Diffstat (limited to 'src/leap/bitmask/core')
-rw-r--r--src/leap/bitmask/core/web/bitmask.js10
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 ae20951..fedd5fc 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) {}