Skip to content

Commit a83a6a9

Browse files
nemadMarkPieszak
authored andcommitted
TrilonIO#336 Fixed duplicate pages on hot module reload (TrilonIO#346)
Closes TrilonIO#336
1 parent 1db3106 commit a83a6a9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Client/main.browser.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ const rootElemTagName = 'app'; // Update this if you change your root component
99
if (module['hot']) {
1010
module['hot'].accept();
1111
module['hot'].dispose(() => {
12-
// Before restarting the app, we create a new root element and dispose the old one
13-
const oldRootElem = document.querySelector(rootElemTagName);
14-
const newRootElem = document.createElement(rootElemTagName);
15-
oldRootElem.parentNode.insertBefore(newRootElem, oldRootElem);
1612
modulePromise.then(appModule => appModule.destroy());
1713
});
1814
} else {

0 commit comments

Comments
 (0)