aboutsummaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'javascript')
-rw-r--r--javascript/olm_pre.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/javascript/olm_pre.js b/javascript/olm_pre.js
index 7706687..50bf8c2 100644
--- a/javascript/olm_pre.js
+++ b/javascript/olm_pre.js
@@ -2,7 +2,7 @@ var olm_exports = {};
var get_random_values;
var process; // Shadow the process object so that emscripten won't get
// confused by browserify
-if (global && global["window"]) {
+if (typeof(global) !== 'undefined' && global["window"]) {
// We're running with browserify
module["exports"] = olm_exports;
global["window"]["Olm"] = olm_exports;