Skip to content

Commit

Permalink
fix: highlight new issues indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Dec 2, 2023
1 parent c0dee12 commit e2d490f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/home/authenticated-get-github-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ async function getNewSessionToken() {
const providerToken = params.get("provider_token");

if (!providerToken) {
throw new Error("Access token not found in URL fragment");
// throw new Error("Access token not found in URL fragment");
return null;
}

const expiresAt = params.get("expires_at");
Expand Down
5 changes: 4 additions & 1 deletion src/home/display-github-issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ async function fetchIssues(container: HTMLDivElement, accessToken: string | null
homeController(container, sortedIssuesByPriority);

// Remove the 'isNew' flag before saving to localStorage
const issuesToSave = freshIssues.map(({ ...issue }) => issue);
const issuesToSave = freshIssues.map(({ ...issue }) => {
delete issue.isNew;
return issue;
});
localStorage.setItem("githubIssues", JSON.stringify(issuesToSave));
} catch (error) {
console.error(error);
Expand Down

0 comments on commit e2d490f

Please sign in to comment.