Skip to content

Commit 8347918

Browse files
committed
release: 1.4.0
1 parent 08a87fd commit 8347918

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"expo": {
33
"name": "MeshTalk",
44
"slug": "MeshTalk",
5-
"version": "1.3.0",
5+
"version": "1.4.0",
66
"orientation": "portrait",
77
"icon": "./assets/icon.png",
88
"userInterfaceStyle": "light",

src/store/usePublishStore.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ const usePublishStore = create<PublishStoreState>((set, get) => ({
3434
drafts: [],
3535
initDrafts: async () => {
3636
const draftsJson = await getItem(constant.STATUSDRAFTS);
37-
const newDraft = JSON.parse(draftsJson || "");
38-
console.log(`当前共有${newDraft.length}条嘟文保存在了本地草稿箱`);
39-
set({
40-
drafts: newDraft,
41-
});
37+
if (draftsJson) {
38+
const newDraft = JSON.parse(draftsJson || "");
39+
console.log(`当前共有${newDraft.length}条嘟文保存在了本地草稿箱`);
40+
set({
41+
drafts: newDraft,
42+
});
43+
}
4244
},
4345
addToDrafts: (draft: NewStatusParams) => {
4446
let newDraft = get().drafts;

0 commit comments

Comments
 (0)