Skip to content

Commit 026cb7d

Browse files
committed
simplify cleanup call
1 parent 37e932f commit 026cb7d

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

packages/jsapi-components/src/useSetPaddedViewportCallback.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,7 @@ export function useSetPaddedViewportCallback(
4646
cleanupSubscription();
4747
}
4848

49-
useEffect(
50-
() => () => {
51-
cleanupSubscription();
52-
},
53-
[]
54-
);
49+
useEffect(() => cleanupSubscription, []);
5550

5651
return useCallback(
5752
function setPaddedViewport(firstRow: number) {

0 commit comments

Comments
 (0)