When you try to trigger the zoom.destroy event, when the big image was not loaded yet, the event is triggered properly but zoom runs into a trap as it initializes itself in the the onload portion of the code.
I decided to fix it by cancelling the generated img's onload event, but thank you for pointing out the issue and submitting a pull request. My apologies for the late response.
When you try to trigger the
zoom.destroy
event, when the big image was not loaded yet, the event is triggered properly but zoom runs into a trap as it initializes itself in the theonload
portion of the code.