Skip to content

Commit cea7933

Browse files
committed
fix(overmind-react): avoid added a flush listener when no paths are tracked
1 parent 5d2188a commit cea7933

File tree

1 file changed

+1
-1
lines changed
  • packages/node_modules/overmind-react/src

1 file changed

+1
-1
lines changed

packages/node_modules/overmind-react/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const createHook = <A extends Overmind<Configuration>>(overmind: A) => {
7474
useEffect(() => {
7575
const paths = overmind.clearTrackState(trackId)
7676

77-
if (paths) {
77+
if (paths && paths.size) {
7878
const listener = overmind.addFlushListener(paths, (flushId) => {
7979
forceUpdate(flushId)
8080
overmind.eventHub.emitAsync(EventType.COMPONENT_UPDATE, {

0 commit comments

Comments
 (0)