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

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

Issue 704333003: Files.app: Add guard closure for selectedAsyncData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 614fbef4f462a19c9a98c22e3cbda6042ee10dfe..2d986bdaae9ac2ba54a51b7490d902a709b97171 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
@@ -200,7 +200,10 @@ FileTransferController.prototype = {
var externalFileUrl;
for (var i = 0; i < this.selectedEntries_.length; i++) {
var url = this.selectedEntries_[i].toURL();
- dataTransfer.items.add(this.selectedAsyncData_[url].file);
+ if (!this.selectedAsyncData_[url])
+ continue;
+ if (this.selectedAsyncData_[url].file)
+ dataTransfer.items.add(this.selectedAsyncData_[url].file);
if (!externalFileUrl)
externalFileUrl = this.selectedAsyncData_[url].externalFileUrl;
}
« 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