Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
fix(cache): issue where cache timestamps wouldn't be updated once cre…
Browse files Browse the repository at this point in the history
…ated
  • Loading branch information
moranje committed Feb 16, 2020
1 parent e768d02 commit 5156040
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/todoist/local-rest-adapter/conf-cache/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ function serialize<GenericStore>(userStore: GenericStore): string {
function deserialize<GenericStore>(json: string): GenericStore {
const stored = JSON.parse(json);

timestampStore.store = Object.assign(
timestampStore.store,
stored._cache || {}
);
// Only initialize store the first time running a run
if (Object.is(timestampStore.store, {})) {
timestampStore.store = stored._cache;
}
delete stored._cache;

return stored;
Expand Down

0 comments on commit 5156040

Please sign in to comment.