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": {