diff --git a/src/virtual-machine.js b/src/virtual-machine.js index d45cca8d2..5056e4ae0 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -474,9 +474,6 @@ class VirtualMachine extends EventEmitter { */ deleteSprite (targetId) { const target = this.runtime.getTargetById(targetId); - // const targetIndexBeforeDelete = this.runtime.targets.map(t => t.id).indexOf(target.id); - // can't call target.id if target doesn't exist. - // moving below if (target) { const targetIndexBeforeDelete = this.runtime.targets.map(t => t.id).indexOf(target.id);