Selaa lähdekoodia

Change the iterator to make it friendlier for the minifier

Robert Marshall 7 vuotta sitten
vanhempi
commit
676b3a576a
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      scripts/controllers/galleryUpload.js

+ 2 - 2
scripts/controllers/galleryUpload.js

@@ -74,9 +74,9 @@ app.controller('galleryUpload', function($scope, $http) {
 		});
 
 		var totalSize = 0;
-		for (var entry of data.getAll("files[]")) {
+		data.getAll("files[]").forEach(function(entry){
 			totalSize += entry.size;
-		}
+		});
 		if (totalSize>$scope.safeUploadSize())
 			errors.push("Max upload size exceeded");