From c11dfd7ecfbd0015d190976c23acf81a4dec9437 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 28 Sep 2014 02:22:08 -0700 Subject: [PATCH] sniff global as window or global due to new CSP in browser --- index.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index d0cc5f6..20990e1 100644 --- a/index.js +++ b/index.js @@ -26,4 +26,4 @@ } exports.knuthShuffle = shuffle; -}('undefined' !== typeof exports && exports || new Function('return this')())); +}('undefined' !== typeof exports && exports || 'undefined' !== typeof window && window || global)); diff --git a/package.json b/package.json index 7b2a0b3..52a274f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "knuth-shuffle", - "version": "1.0.0", + "version": "1.0.1", "description": "The Fisher-Yates (aka Knuth) shuffle for Browser and Node.js", "main": "index.js", "scripts": {