Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48c9556

Browse files
committed
(hotfix): actually make localStorage the default
- I thought I made this edit before but I guess I forgot to add it in - maybe I looked athttps://github.com/pinqy520/mobx-persist/blob/a0bb0ea26142c498665dc65a096acab46c21847f/src/index.ts#L41 and thought the code was okay -- but it's also set to the default arg a few lines up
1 parent061ec8d commit48c9556

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎persist.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as LocalStorage from './localStorageAdaptor.js'
55
exportconstpersist=(name,store,options={})=>{
66
let{storage, jsonify, whitelist, blacklist}=options
77

8-
if(typeofwindow.localStorage!=='undefined'&&window.localStorage===storage){
8+
if(typeofwindow.localStorage!=='undefined'&&(!storage||storage===window.localStorage)){
99
storage=LocalStorage
1010
}
1111
if(!jsonify){jsonify=true}// default to true like mobx-persist

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp