Skip to content

Commit 172b93b

Browse files
authored
fix: newCleanup judgement
1 parent 28dde1a commit 172b93b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class Component {
8585
isFunction(cleanup) && cleanup!()
8686

8787
const newCleanup = callback(this.base)
88-
if (cleanup) {
88+
if (newCleanup) {
8989
__ReactMemoizedEffects[cursor].cleanup = newCleanup
9090
}
9191
})

0 commit comments

Comments
 (0)