8000 fix: prevent potential errors by checking for module.forHMROnly befor… · vaadin/flow@f378e2b · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit f378e2b

Browse files
fix: prevent potential errors by checking for module.forHMROnly before assignment (#21374) (#21389)
Co-authored-by: Luciano Vernaschi <luciano@vaadin.com>
1 parent f3f2f77 commit f378e2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flow-server/src/main/resources/com/vaadin/flow/server/frontend/vaadin-react.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export { routes as forHMROnly };
1111
if (import.meta.hot) {
1212
// @ts-ignore
1313
import.meta.hot.accept((module) => {
14-
(window as any).Vaadin.routesConfig = module.forHMROnly;
14+
if (module?.forHMROnly) {
15+
(window as any).Vaadin.routesConfig = module.forHMROnly;
16+
}
1517
});
1618
}

0 commit comments

Comments
 (0)
0