Skip to content

Commit 15bddb9

Browse files
committed
solving potential null reference error by adding optional chaining to tab.id in the condition.
1 parent 2400105 commit 15bddb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/seed-bible/app/components/thePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ function ThePage({
515515
whisper(getBot("system", "introduction.searchBar"), "initialize");
516516
}
517517

518-
if (!bible || (bible && bible?.tabId && bible.tabId !== tab.id)) {
518+
if (!bible || (bible && bible?.tabId && bible.tabId !== tab?.id)) {
519519
loadDataSafe();
520520
}
521521
globalThis.CurrentTab = tab;

0 commit comments

Comments
 (0)