From 01a570df55b84f14647e1e7e6489895a2dd9f264 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 6 Feb 2015 14:29:26 +0100 Subject: [PATCH] Explicitly propagating shuffle() in global namespace The minified JS files use IIFE wrappers to utilize strict mode, but this can cause the shuffle() function to be unknown outside the wrapper. --- wcfsetup/install/files/js/WCF.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 30c0bc96c2..a327938d5e 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -103,7 +103,7 @@ String.prototype.hashCode = function() { * * @see http://stackoverflow.com/a/2450976 */ -function shuffle(array) { +window.shuffle = function(array) { var currentIndex = array.length, temporaryValue, randomIndex; // While there remain elements to shuffle... -- 2.20.1