Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(696)

Unified Diff: ui/file_manager/file_manager/foreground/js/file_transfer_controller.js

Issue 956853002: Fix JS errors of FileTransferController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
index 4f2e278e548987f603171e259773c0c083a4e39e..adc9be5409ef60aaaf8d6c7280b3533136aeb558 100644
--- a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
@@ -1083,6 +1083,7 @@ FileTransferController.prototype.onFileSelectionChangedThrottled_ = function() {
for (var i = 0; i < entries.length; i++) {
if (entries[i].isFile)
fileEntries.push(entries[i]);
+ asyncData[entries[i].toURL()] = {externalFileUrl: '', file: null};
}
var containsDirectory = this.selectionHandler_.selection.directoryCount > 0;
@@ -1092,7 +1093,6 @@ FileTransferController.prototype.onFileSelectionChangedThrottled_ = function() {
// asynchronous operations.
if (!containsDirectory) {
for (var i = 0; i < fileEntries.length; i++) {
- asyncData[fileEntries[i].toURL()] = {externalFileUrl: '', file: null};
fileEntries[i].file(function(data, file) {
data.file = file;
}.bind(null, asyncData[fileEntries[i].toURL()]));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698