Describe the bug
Values aren't actually restored from cache/localstorage because the return type of Preferences.get doesn't match the react-native async storage API's.
As a result parseData function always returns the fallback.
Essentially here it should be something like persistedData.value
|
const parseData = (persistedData: any, fallback: any) => { |
|
try { |
|
if (persistedData) |
|
return JSON.parse(persistedData) |
|
} |
|
catch (_err) {} |
|
|
|
return fallback |
|
} |
Reproduction
N/A
System Info
Used Package Manager
n/a
Validations
Describe the bug
Values aren't actually restored from cache/localstorage because the return type of
Preferences.getdoesn't match the react-native async storage API's.As a result
parseDatafunction always returns the fallback.Essentially here it should be something like
persistedData.valueurql-storage-capacitor/src/makeAsyncStorage.ts
Lines 11 to 19 in 17696dd
Reproduction
N/A
System Info
Used Package Manager
n/a
Validations