Skip to content

Commit

Permalink
chore: stop loading allowance if no url is present
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Mar 12, 2024
1 parent cefb093 commit 71cf8aa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/app/screens/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ const Home: FC = () => {
if (currentUrl) {
const url = new URL(currentUrl);
setCurrentUrl(url);
}

if (currentUrl && currentUrl.startsWith("http")) {
browser.tabs.sendMessage(tabs[0].id as number, {
action: "extractLightningData",
});
if (currentUrl.startsWith("http")) {
browser.tabs.sendMessage(tabs[0].id as number, {
action: "extractLightningData",
});
}
} else {
setLoadingAllowance(false);
}
};

Expand Down

0 comments on commit 71cf8aa

Please sign in to comment.