Skip to content

Commit 81a431f

Browse files
fix(chat): fix SSR hotReloadEpic subscriptions leads to a memory leak (Issue #5316) (#5319)
Co-authored-by: Alexander <98586297+Alexander-Kezik@users.noreply.github.com>
1 parent 3cd3ecd commit 81a431f

3 files changed

Lines changed: 5 additions & 12 deletions

File tree

apps/chat/src/store/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,7 @@ export const createStore = (preloadedState: { settings: SettingsState }) => {
9696
preloadedState,
9797
middleware,
9898
});
99-
epicMiddleware.run(hotReloadingEpic);
100-
101-
if ((module as NodeModuleWithHot).hot) {
102-
(module as NodeModuleWithHot).hot.accept('./rootEpic', async () => {
103-
const next = await import('./rootEpic');
104-
epic$.next(next.rootEpic);
105-
});
106-
}
99+
epicMiddleware.run(rootEpic as Epic);
107100

108101
return localStore;
109102
}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
"dompurify": "3.3.0",
192192
"js-yaml": "4.1.1",
193193
"glob": "11.1.0",
194-
"@modern-js/utils": "2.69.4"
194+
"@modern-js/utils": "2.69.5"
195195
},
196196
"engines": {
197197
"node": ">=24.11.1",

0 commit comments

Comments
 (0)