diff --git a/src/Global.js b/src/Global.js index 0c1568fd..63210981 100644 --- a/src/Global.js +++ b/src/Global.js @@ -29,7 +29,7 @@ */ // runtime check for already included Konva -(function(){ +(function(global){ 'use strict'; /** * @namespace Konva @@ -246,4 +246,4 @@ } Konva.document = document; Konva.window = window; -})(); +})(typeof window !== 'undefined' ? window : global);