Skip to content

Commit 00554df

Browse files
author
DD Liu
committed
Handle null bounds
1 parent 90040df commit 00554df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/RenderWebGL.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ class RenderWebGL extends EventEmitter {
773773
// candidate drawables' bounds--since the background spans the entire stage, we must check
774774
// everything that lies inside the drawable.
775775
bounds = this._touchingBounds(drawableID);
776+
// e.g. empty costume, or off the stage
777+
if (bounds === null) return false;
776778
} else if (candidates.length === 0) {
777779
// If not checking for the background color, we can return early if there are no candidate drawables.
778780
return false;

0 commit comments

Comments
 (0)