Skip to content

Commit

Permalink
Fix 'TypeError: Cannot read properties of undefined (reading 'include…
Browse files Browse the repository at this point in the history
…s')' errors
  • Loading branch information
pdehaan authored and maxxcrawford committed Jul 5, 2023
1 parent 3cac6d8 commit 339d7ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const isSiteInContainer = async(panelId) => {

const activeRootDomain = await getActiveRootDomainFromBackground();

if (addedSitesList.includes(activeRootDomain)) {
if (addedSitesList && addedSitesList.includes(activeRootDomain)) {
return true;
}
};
Expand Down Expand Up @@ -345,7 +345,7 @@ document.addEventListener("DOMContentLoaded", async () => {
const storage = await browser.storage.local.get();
const currentPanel = storage.CURRENT_PANEL;

const onboarding = (currentPanel.includes("onboarding"));
const onboarding = (currentPanel && currentPanel.includes("onboarding"));
if (!onboarding) {
return buildPanel(currentPanel);
}
Expand Down

0 comments on commit 339d7ae

Please sign in to comment.