Skip to content

Commit

Permalink
fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao583 committed Jan 14, 2025
1 parent c0380fd commit e0e1b54
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontend/src/utilities/useWatchIntegrationComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,21 @@ export const useWatchIntegrationComponents = (
setNewComponents(components);
} else {
const watchComponents = () => {
if (!isMounted) return;
if (!isMounted) {
return;

Check warning on line 90 in frontend/src/utilities/useWatchIntegrationComponents.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/useWatchIntegrationComponents.tsx#L89-L90

Added lines #L89 - L90 were not covered by tests
}
updateComponentEnablementStatus(integrationComponents, components).then(() => {
if (!isMounted) return;
if (!isMounted) {
return;

Check warning on line 94 in frontend/src/utilities/useWatchIntegrationComponents.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/useWatchIntegrationComponents.tsx#L93-L94

Added lines #L93 - L94 were not covered by tests
}
setIsIntegrationComponentsChecked(true);
watchHandle = setTimeout(watchComponents, POLL_INTERVAL);
});
};
watchComponents();
}
}

return () => {
isMounted = false;
clearTimeout(watchHandle);
Expand Down

0 comments on commit e0e1b54

Please sign in to comment.