You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the code for the 'get' method of jsonStorage:
get: function(key){varraw=getStorage().getItem(getNamespacedKey(key));try{varpayload=JSON.parse(raw);returnpayload.value;}catch(e){thrownewError('Unable to parse JSON from storage');}}
If a key is not defined, this will throw an exception saying cannot parse, even though the issue is actually that it will throw a 'cannot read property value of payload'.
Really it should just return null if raw is null. I'll do a PR.
The text was updated successfully, but these errors were encountered:
This is the code for the 'get' method of jsonStorage:
If a key is not defined, this will throw an exception saying cannot parse, even though the issue is actually that it will throw a 'cannot read property value of payload'.
Really it should just return null if raw is null. I'll do a PR.
The text was updated successfully, but these errors were encountered: