Skip to content

Commit 6ce9f59

Browse files
committed
fix(mothership): simplify onNotFoundRef sync to inline assignment
1 parent fd31526 commit 6ce9f59

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content

apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,7 @@ function EmbeddedLog({ logId, onNotFound }: EmbeddedLogProps) {
634634
const { data: log, isLoading, error } = useLogDetail(logId)
635635

636636
const onNotFoundRef = useRef(onNotFound)
637-
useEffect(() => {
638-
onNotFoundRef.current = onNotFound
639-
}, [onNotFound])
637+
onNotFoundRef.current = onNotFound
640638

641639
useEffect(() => {
642640
if (isApiClientError(error) && error.status === 404) {

0 commit comments

Comments
 (0)