Skip to content

Commit

Permalink
Discard changes to src/storage.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Oct 17, 2024
1 parent a163392 commit 6c906e8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ export const cookieStore: PersistentStore = {
return decodeURIComponent(c.substring(nameEQ.length, c.length))
}
}
} catch {
// noop
}
} catch {}
return null
},

Expand Down Expand Up @@ -161,16 +159,17 @@ export const cookieStore: PersistentStore = {
}

document.cookie = new_cookie_val
return new_cookie_val
} catch {
// no-op
return
}
},

remove: function (name, cross_subdomain) {
try {
cookieStore.set(name, '', -1, cross_subdomain)
} catch {
// no-op
return
}
},
}
Expand Down Expand Up @@ -259,9 +258,7 @@ export const localPlusCookieStore: PersistentStore = {
try {
// See if there's a cookie stored with data.
cookieProperties = cookieStore.parse(name) || {}
} catch {
// noop
}
} catch {}
const value = extend(cookieProperties, JSON.parse(localStore.get(name) || '{}'))
localStore.set(name, value)
return value
Expand Down

0 comments on commit 6c906e8

Please sign in to comment.