2.1.5 is not working for SVGs loaded after intialization
selbekk opened this issue · 4 comments
selbekk commented
selbekk commented
Looks like this line is the culprit.
The reason for this breaking things (for us) is that we have a SPA that first shows a spinner and then loads some new HTML (with SVGs).
When the script first starts up, the result of document.getElementsByType('use')
returns 0, and 0 - 0 is not greater than zero. Therefore, the requestAnimationFrame
is never called, which in turn never re-runs the onInterval
function.
I'll create a PR :-)
timeiscoffee commented
Crap, thanks for fixing this. I'll merge and republish.
timeiscoffee commented
Thanks @selbekk, I just published v2.1.6 with your fix.
selbekk commented
Yay! No problem - glad to help 😊