mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
Select the stage if the project has no sprites
This commit is contained in:
parent
635b40ec2b
commit
33fc797868
1 changed files with 5 additions and 1 deletions
|
@ -222,7 +222,11 @@ class VirtualMachine extends EventEmitter {
|
|||
}
|
||||
}
|
||||
// Select the first target for editing, e.g., the first sprite.
|
||||
if (this.runtime.targets.length > 1) {
|
||||
this.editingTarget = this.runtime.targets[1];
|
||||
} else {
|
||||
this.editingTarget = this.runtime.targets[0];
|
||||
}
|
||||
|
||||
// Update the VM user's knowledge of targets and blocks on the workspace.
|
||||
this.emitTargetsUpdate();
|
||||
|
|
Loading…
Reference in a new issue