mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
fix invalid page state resolving
This commit is contained in:
parent
2a9eca457a
commit
27cc17cd4a
1 changed files with 11 additions and 2 deletions
|
@ -302,11 +302,20 @@ class DynamicCardStack {
|
|||
* @param {String} key
|
||||
*/
|
||||
getState(key) {
|
||||
if (!this.pageState[this.rootIndex]) return null;
|
||||
if (!this.pageState[this.rootIndex][key]) return null;
|
||||
if (typeof(this.pageState[this.rootIndex]) == "undefined") return null;
|
||||
if (typeof(this.pageState[this.rootIndex][key]) == "undefined") return null;
|
||||
return this.pageState[this.rootIndex][key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all page state.
|
||||
* Only really intended for debugging purposes.
|
||||
* @returns {Object}
|
||||
*/
|
||||
getAllCurrentState() {
|
||||
return this.pageState[this.rootIndex];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all page state.
|
||||
* Only really intended for debugging purposes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue