souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
391 stars 63 forks source link

Reload root element during reInit process #50

Closed ooasis closed 3 years ago

ooasis commented 3 years ago

This occurred to me when trying to integrate with a Nuxt project. It appears that if the ID_ROOT element is recreate with dynamic content, the old reference to it will be set to null which causes this line to fail

  root.innerHTML = "";

The simple fix is to re-assign the root before refresh all.

souramoo commented 3 years ago

Thanks for this! Merging now :)