Fix a console error when importing in a browser

something about 'global' not defined
logging_enabled
Richard van der Hoff 2015-12-02 14:06:01 +00:00
parent 2bb7f3b1e6
commit a5fe3f605a
1 changed files with 1 additions and 1 deletions

View File

@ -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;