Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Nov 7, 2023
1 parent 584196f commit 8dfaa49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/utils/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export const toStorageObject = (decoded: ReturnType<typeof decodeKeyValue>) => {
if (key) {
for (let i = key.length - 1; i >= 0; i--) {
const k = key[i]
const newObj = { [k.toString()]: obj }
const strKey = ['string', 'number'].includes(typeof k) ? k : JSON.stringify(k)
const newObj = { [strKey]: obj }
obj = newObj
}
}
Expand Down

0 comments on commit 8dfaa49

Please sign in to comment.