Skip to content

Commit

Permalink
Fix wrong place of firing onErrorOccured.
Browse files Browse the repository at this point in the history
  • Loading branch information
amovar18 committed May 1, 2024
1 parent e656db4 commit cacebdb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/library-detection/src/core/stateProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ export const LibraryDetectionProvider = ({ children }: PropsWithChildren) => {
}, []);

const onErrorOccuredListener = useCallback(
({ frameId }: chrome.webNavigation.WebNavigationFramedCallbackDetails) => {
if (frameId === 0) {
({
frameId,
tabId: _tabId,
}: chrome.webNavigation.WebNavigationFramedCallbackDetails) => {
if (frameId === 0 && _tabId === chrome.devtools.inspectedWindow.tabId) {
setErrorOccured(true);
}
},
Expand Down

0 comments on commit cacebdb

Please sign in to comment.