Skip to content

Commit

Permalink
feat: Remove old hack for DefaultRedirectionUrl migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ldoppea committed Dec 20, 2024
1 parent 1a3e859 commit e326503
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/libs/localStore/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,6 @@ export const getData = async <T>(name: StorageKey): Promise<T | null> => {
? (JSON.parse(value) as T)
: null
} catch (error) {
/*
If we tried to parse the default redirection url and it failed, we return it as is
because previously it was stored as a string where as now it is stored as a stringified string.
Default redirection url is written often, so active users
will automatically remove the old format from their local storage.
In some weeks we will be able to remove this compatibility code.
*/
if (name === CozyPersistedStorageKeys.DefaultRedirectionUrl) {
const value = await getItem(name)
return value as T
}

log.error(`Failed to get key "${name}" from persistent storage`, error)
return null
}
Expand Down

0 comments on commit e326503

Please sign in to comment.