From f8ff13ad9e75159557f6d92aa45c452d42d89a49 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 16 Mar 2010 04:15:05 +0000 Subject: [PATCH] MINOR Fixed multifile.js non-standard forEach() reference, using jQuery.each() instead git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@101135 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- thirdparty/multifile/multifile.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/thirdparty/multifile/multifile.js b/thirdparty/multifile/multifile.js index fc42ab0e..4cd65ad9 100755 --- a/thirdparty/multifile/multifile.js +++ b/thirdparty/multifile/multifile.js @@ -53,12 +53,12 @@ ObservableObject.prototype = { unsubscribe : function(evt, fn) { this.functions = this.fns.filter(function(el) {if (el !== [evt, fn]) return el;}); }, - fire : function(evt, data, scope) { - scope = scope || window - this.functions.forEach(function(el) { - if (el[0] == evt) el[1].call(scope, data); - }); - } + fire : function(evt, data, scope) { + scope = scope || window + jQuery(this.functions).each(function(el) { + if (el[0] == evt) el[1].call(scope, data); + }); + } }; var MultiSelectorObserver = new ObservableObject();