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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/CommandMenu.js

Issue 2592433003: [DevTools] Replace ViewportControl with ListControl. (Closed)
Patch Set: tests Created 4 years 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
Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/CommandMenu.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/CommandMenu.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/CommandMenu.js
index e70cb71d40eb3a2eaccb92be3aff155fce215dfc..93d494dcf4de2a48f15d899b558fdb3b0ad0ef03 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/CommandMenu.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/CommandMenu.js
@@ -225,10 +225,12 @@ UI.CommandMenuDelegate = class extends UI.FilteredListWidget.Delegate {
/**
* @override
- * @param {number} itemIndex
+ * @param {?number} itemIndex
* @param {string} promptValue
*/
selectItem(itemIndex, promptValue) {
+ if (itemIndex === null)
+ return;
this._commands[itemIndex].execute();
}

Powered by Google App Engine
This is Rietveld 408576698