frontend: enforce valid overlays in overlaystore
This commit is contained in:
parent
200f1005b9
commit
ec7de22dca
1 changed files with 4 additions and 1 deletions
|
@ -301,11 +301,14 @@ class OverlayStore extends Store {
|
|||
toast: null,
|
||||
login: null,
|
||||
createAccount: null,
|
||||
settings: null
|
||||
editMessage: null,
|
||||
settings: null,
|
||||
}, "OverlayStore");
|
||||
}
|
||||
|
||||
open(name, props={}) {
|
||||
if (this.value[name] === undefined)
|
||||
throw new Error(`OverlayStore.open: tried to open unknown overlay with name '${name}' (undefined in overlay map)`);
|
||||
this.value[name] = props;
|
||||
this.updated();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue