Skip to content
This repository was archived by the owner on Aug 31, 2025. It is now read-only.

Commit 14a677e

Browse files
committed
🎨 inline $patch condition
1 parent 33cc25d commit 14a677e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ export function createPersistedState(
110110

111111
try {
112112
const fromStorage = storage.getItem(key)
113-
if (fromStorage) {
114-
store.$patch(serializer.deserialize(fromStorage))
115-
}
113+
if (fromStorage) store.$patch(serializer.deserialize(fromStorage))
116114
} catch (_error) {}
117115

118116
afterRestore?.(context)

0 commit comments

Comments
 (0)