Skip to content

Commit 0afd150

Browse files
committed
the set method of createCalorieDateMap calls the store's set function
1 parent ab28d8b commit 0afd150

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/stores.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function createCalorieDateMap() {
1414
subscribe,
1515
set: (val: CalorieDateMap) => {
1616
localStorage.calorieMap = JSON.stringify(val);
17+
set(val);
1718
},
1819
update: (cb: (arg0: CalorieDateMap) => CalorieDateMap) => {
1920
const newStore = cb(get(store));

0 commit comments

Comments
 (0)