mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-05 23:38:30 +08:00
Fixed a bug where Menu items that had a defined falsy value could not be selected.
This commit is contained in:
parent
d16c1634ba
commit
02e9690187
@ -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 });
|
||||||
|
Loading…
Reference in New Issue
Block a user