Declare i variable just once

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-11-29 17:07:20 +01:00
parent c1d37cbc9a
commit b5029f8191

View File

@ -565,6 +565,7 @@ var AJAX = {
*/
load: function (files, callback) {
var self = this;
var i;
// Clear loaded scripts if they are from another version of phpMyAdmin.
// Depends on common params being set before loading scripts in responseHandler
if (self._scriptsVersion === null) {
@ -575,13 +576,13 @@ var AJAX = {
}
self._scriptsCompleted = false;
self._scriptsToBeFired = [];
for (var i in files) {
for (i in files) {
self._scriptsToBeLoaded.push(files[i].name);
if (files[i].fire) {
self._scriptsToBeFired.push(files[i].name);
}
}
for (var i in files) {
for (i in files) {
var script = files[i].name;
// Only for scripts that we don't already have
if ($.inArray(script, self._scripts) === -1) {