Fixes edge reset case

Prevents errors if third-party javascript has already emptied the target canvas container
Merge remote-tracking branch 'upstream/turtledev' into turtle-suspensions