Fixes "Cannot read property 'removeEventListener' of null" issue - document.querySelector returned null in the destroyed and beforeDestroy lifecycle hook - replaced with refs
Developer self-review checklist
[x] Potentially confusing code has been explained with comments
[x] No warnings or errors have been introduced; all known error cases have been handled
[x] Any appropriate documentation (within the code, README.md, docs, etc) has been updated
Description
document.querySelector
returned null in thedestroyed
andbeforeDestroy
lifecycle hook - replaced with refsDeveloper self-review checklist