瀏覽代碼

Change the iterator to make it friendlier for the minifier

Robert Marshall 7 年之前
父節點
當前提交
676b3a576a
共有 1 個文件被更改,包括 2 次插入2 次删除
  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");