Skip to content

Commit be779da

Browse files
authored
Fix migration function for brand new users (#1002)
1 parent f667a2f commit be779da

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

client/src/utils/storage.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ const storage = {
9494
},
9595

9696
migrate: (data: Record<string, any>) => {
97+
// User has never seen Notangles
98+
if (!data || typeof data !== 'object') {
99+
data = {};
100+
}
101+
97102
// only do this if version does not exist
98103
if (data.version !== 1 || data.version == null) {
99104
let migrated = {

0 commit comments

Comments
 (0)