optional chaining
This commit is contained in:
parent
0fc8eec293
commit
5ea3d462b9
34 changed files with 68 additions and 77 deletions
|
|
@ -185,7 +185,7 @@ export const piniaPersistPlugin =
|
|||
}
|
||||
|
||||
const fallbackValue = await storage.getItem(vuexKey)
|
||||
if (fallbackValue && fallbackValue[id]) {
|
||||
if (fallbackValue?.[id]) {
|
||||
console.info(`Migrating ${id} store data from vuex to pinia`)
|
||||
const res = fallbackValue[id]
|
||||
await storage.setItem(key, res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue