Fixed a bug where Menu items that had a defined falsy value could not be selected.

This commit is contained in:
jtuu 2019-11-21 22:12:08 +02:00
parent d16c1634ba
commit 02e9690187

View File

@ -169,7 +169,7 @@ export class Menu<T> extends Widget {
private select_item(index: number): void { private select_item(index: number): void {
const item = this.items.val[index]; const item = this.items.val[index];
if (!item) return; if (item === undefined) return;
this.selected.set_val(item, { silent: false }); this.selected.set_val(item, { silent: false });
this.visible.set_val(false, { silent: false }); this.visible.set_val(false, { silent: false });