From f1690aff5ba4071b56df485646b96c9d12c293ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Thu, 31 Jan 2019 15:27:43 +0100 Subject: [PATCH] =?utf8?q?Use=20normal=20for-loop=20instead=20of=20for=20(?= =?utf8?q?=E2=80=A6=20in=20=E2=80=A6)=20See=20#2825?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js index 5cb625eed8..4edb7e5952 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js @@ -105,7 +105,7 @@ define(['Core', 'Language', 'Dom/Util', 'WoltLabSuite/Core/Ui/File/Delete', 'Upl }, _failure: function(uploadId, data, responseText, xhr, requestOptions) { - for (var i in this._fileElements[uploadId]) { + for (var i = 0, length = this._fileElements[uploadId].length; i < length; i++) { this._fileElements[uploadId][i].classList.add('uploadFailed'); elBySel('small', this._fileElements[uploadId][i]).innerHTML = ''; @@ -130,7 +130,7 @@ define(['Core', 'Language', 'Dom/Util', 'WoltLabSuite/Core/Ui/File/Delete', 'Upl }, _success: function(uploadId, data, responseText, xhr, requestOptions) { - for (var i in this._fileElements[uploadId]) { + for (var i = 0, length = this._fileElements[uploadId].length; i < length; i++) { if (data['files'][i] !== undefined) { if (this._options.imagePreview) { if (data['files'][i].image === null) { -- 2.20.1