Skip to content

Commit bf101a0

Browse files
committed
fix(web): clean up SSR registry listeners on reset
1 parent 6cd48f3 commit bf101a0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/unistyles/src/web/registry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ export class UnistylesRegistry {
126126
}
127127

128128
reset = () => {
129+
this.disposeListenersMap.forEach((dispose) => dispose())
129130
this.css.reset()
131+
this.stylesheets.clear()
130132
this.stylesCache.clear()
131133
this.dependenciesMap.clear()
132134
this.disposeListenersMap.clear()

0 commit comments

Comments
 (0)