mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-05-15 07:51:04 -04:00
Always unset topLevel
in deleteStack_
Blocks may have topLevel set even if they are not present in this.stacks
This commit is contained in:
parent
18e4228399
commit
214daa8087
1 changed files with 3 additions and 5 deletions
|
@ -365,11 +365,9 @@ Runtime.prototype._addStack = function (id) {
|
|||
*/
|
||||
Runtime.prototype._deleteStack = function (id) {
|
||||
var i = this.stacks.indexOf(id);
|
||||
if (i > -1) {
|
||||
this.stacks.splice(i, 1);
|
||||
// Update `topLevel` property on the top block.
|
||||
this.blocks[id].topLevel = false;
|
||||
}
|
||||
if (i > -1) this.stacks.splice(i, 1);
|
||||
// Update `topLevel` property on the top block.
|
||||
if (this.blocks[id]) this.blocks[id].topLevel = false;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue