Explorar el Código

Change the iterator to make it friendlier for the minifier

Robert Marshall hace 7 años
padre
commit
676b3a576a
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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");