diff --git a/src/home/authenticated-get-github-user.ts b/src/home/authenticated-get-github-user.ts index 1e7bdda1..28f1aac9 100644 --- a/src/home/authenticated-get-github-user.ts +++ b/src/home/authenticated-get-github-user.ts @@ -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"); diff --git a/src/home/display-github-issues.ts b/src/home/display-github-issues.ts index 97626d6e..ed2f0a9e 100644 --- a/src/home/display-github-issues.ts +++ b/src/home/display-github-issues.ts @@ -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);