-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
Currently the key
option for the importing of the plugin only allows for State Tokens and strings. This causes an error (#123) if you pass in a StateModel
.
It should be fairly easy to suppose a StateModel
object since it has a name
attribute which is the value that needs to be examined rather than the key
itself.
for (const key of keys) {
let val = nextState;
if (key !== '@@STATE') {
val = getValue(nextState, key);
}
try {
this._asyncEngine.setItem(key, options.serialize(val));
}
catch (e) {
console.error('Error ocurred while serializing the store value, value not updated.');
}
}
Just check to see if the key is a StateModel
and if it is, the "real name" is key.name
rather than key
.
Metadata
Metadata
Assignees
Labels
No labels