From 063bddd9c58e527247bd53dbf985c16d897489b1 Mon Sep 17 00:00:00 2001 From: Morten Vestergaard Hansen Date: Fri, 25 May 2018 17:59:39 +0200 Subject: [PATCH] Added check for window (#1446) If nodejs, use global as scope, else use window. Closes #1445 --- AUTHORS | 1 + CONTRIBUTORS | 1 + build/wrapper.template.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 286360523a..4acb3a17f5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -29,6 +29,7 @@ Jozef Chúťka JW Player <*@jwplayer.com> Lucas Gabriel Sánchez Mattias Wadman +Morten Hansen Nick Desaulniers Oskar Arvidsson Patrick Kunka diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a781063d97..95b32a6039 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -49,6 +49,7 @@ Lucas Gabriel Sánchez Matias Russitto Mattias Wadman Michelle Zhuo +Morten Hansen Natalie Harris Nick Desaulniers Niklas Korz diff --git a/build/wrapper.template.js b/build/wrapper.template.js index 9fee18bef7..5bcd7ffb82 100644 --- a/build/wrapper.template.js +++ b/build/wrapper.template.js @@ -3,4 +3,4 @@ if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka; else if (typeof(define)!="undefined" && define.amd)define(function(){return g.shaka}); else this.shaka=g.shaka; -}).call(window); +}).call(typeof window === "object" ? window : global);