Skip to content

Commit 2eb3cba

Browse files
committed
Project: never start dragging a sprite that doesn't exist anymore
1 parent 70c8c4c commit 2eb3cba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Project.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ export default class Project {
226226
}
227227

228228
private _startDragging(): void {
229+
if (!this.spritesAndClones.includes(this._consideringDraggingSprite)) {
230+
this._consideringDraggingSprite = null;
231+
}
232+
229233
if (this._consideringDraggingSprite) {
230234
this.draggingSprite = this._consideringDraggingSprite;
231235
this._consideringDraggingSprite = null;

0 commit comments

Comments
 (0)