typicode / lowdb

Simple and fast JSON database
MIT License
21.3k stars 918 forks source link

localstorage data disappear after refresh page #551

Closed yifeng-two closed 1 year ago

yifeng-two commented 1 year ago

use it with localstorage in vue3,store used pinia,localstorage data disappear after refresh page

typicode commented 1 year ago

I tried and couldn't reproduce the issue. If you still have the problem feel free to reopen. Also could you provide a failing case in a repo or CodeSandbox.

yifeng-two commented 1 year ago

I have solve this problem,it is caused by using a wrong  way with lodash,after set default data should not use db.write()。

千里之外 @.***

 

------------------ 原始邮件 ------------------ 发件人: "typicode/lowdb" @.>; 发送时间: 2022年10月24日(星期一) 凌晨4:36 @.>; @.**@.>; 主题: Re: [typicode/lowdb] localstorage data disappear after refresh page (Issue #551)

I tried and couldn't reproduce the issue. If you still have the problem feel free to reopen. Also could you provide a failing case in a repo or CodeSandbox.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

typicode commented 1 year ago

Thanks for the update