Fix a console error when importing in a browser
something about 'global' not defined
This commit is contained in:
parent
2bb7f3b1e6
commit
a5fe3f605a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue