From ac44bee03ac9b3d54f54eec0490789cbbee8d61a Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Tue, 15 Mar 2016 15:37:26 +0000 Subject: [PATCH] fix global reference for node env --- src/Global.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);