Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
Listen to document.body child changes in the observer. It fixes situations in which #app is removed by a framework
  • Loading branch information
paulbrie authored Oct 25, 2023
1 parent cb4290c commit 55fbda6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
observer.disconnect();
delete observer;
});
observer.observe(document.getElementById("app"), { childList: true });
observer.observe(document.body, { childList: true });
} else {
new Menu().init();
new Accordion().init();
Expand Down

0 comments on commit 55fbda6

Please sign in to comment.