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

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

Issue 532453002: Handle the case when the last selection is not set yet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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_table.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_table.js b/ui/file_manager/file_manager/foreground/js/file_table.js
index e7d063e7281e471f5d58dbb6e07e444e66a5ee71..9f4bb016670938a892d60e49a634730eafdf2c19 100644
--- a/ui/file_manager/file_manager/foreground/js/file_table.js
+++ b/ui/file_manager/file_manager/foreground/js/file_table.js
@@ -395,7 +395,7 @@ FileTable.prototype.shouldStartDragSelection_ = function(event) {
// If the pointed item is already selected, it should not start the drag
// selection.
- if (this.lastSelection_.indexOf(itemIndex) !== -1)
+ if (this.lastSelection_ && this.lastSelection_.indexOf(itemIndex) !== -1)
return false;
// If the horizontal value is not hit to column, it should start the drag
« 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