fix: accept hot updates and destroy entity list

This commit is contained in:
cha0s 2019-03-21 01:35:19 -05:00
parent 5078c064f0
commit 596ab4385b

View File

@ -56,7 +56,11 @@ const appNode = document.querySelector('.app');
appNode.appendChild(renderer.element);
if (module.hot) {
module.hot.accept((error) => {
console.error(error);
});
module.hot.dispose(() => {
entityList.destroy();
appNode.removeChild(renderer.element);
stage.destroy();
renderer.destroy();