Skip to content

Commit

Permalink
fix: memoize cache maybe null && open tab twice
Browse files Browse the repository at this point in the history
  • Loading branch information
SunriseFox committed Dec 2, 2019
1 parent e17d92c commit 88e54b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ export async function fetchPostContentFacebook(post: PostIdentifier<PersonIdenti
}
} catch (e) {
console.warn(e)
memoizeFetch.cache.delete(url)
memoizeFetch.cache?.delete(url)
}
}
}

// Path 2: fetch by tab task
return tasks(getPostUrlAtFacebook(post, 'open')).getPostContent()
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,9 @@ export async function fetchProfileFacebook(who: PersonIdentifier): Promise<Profi
return { bioContent: bio }
} catch (e) {
console.warn(e)
memoizeFetch.cache.delete(url)
memoizeFetch.cache?.delete(url)
}
}
} else {
// Open a new tab in the background
tasks(getProfilePageUrlAtFacebook(who, 'open'), {
runAtTabID: activeTabID,
}).getProfile(who)
}

// Path 2: fetch by tab task
Expand Down

0 comments on commit 88e54b6

Please sign in to comment.