Fixes edge reset case

Prevents errors if third-party javascript has already emptied the target canvas container