forked from MapComplete/MapComplete
Fix: change inner workings of how history is kept, should improve performance
This commit is contained in:
parent
27ae31afe7
commit
7c57047d30
3 changed files with 102 additions and 91 deletions
|
@ -807,7 +807,7 @@ export class UIEventSource<T> extends Store<T> implements Writable<T> {
|
|||
)
|
||||
}
|
||||
|
||||
static asObject<T extends object>(
|
||||
static asObject<T extends object | string>(
|
||||
stringUIEventSource: UIEventSource<string>,
|
||||
defaultV: T
|
||||
): UIEventSource<T> {
|
||||
|
@ -819,7 +819,7 @@ export class UIEventSource<T> extends Store<T> implements Writable<T> {
|
|||
try {
|
||||
return <T>JSON.parse(str)
|
||||
} catch (e) {
|
||||
console.error("Could not parse value", str, "due to", e)
|
||||
console.error("Could not parse value", str, "due to", e, "; the underlying data store has tag", stringUIEventSource.tag)
|
||||
return defaultV
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue