mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-30 08:10:27 -04:00
Fix issue when broadcasting in a when-broadcast
This commit is contained in:
parent
fe2ba2a536
commit
4f2cccf279
2 changed files with 2 additions and 2 deletions
src
|
@ -76,7 +76,8 @@ Scratch3EventBlocks.prototype.broadcastAndWait = function (args, util) {
|
|||
var waiting = false;
|
||||
for (var i = 0; i < util.stackFrame.triggeredThreads.length; i++) {
|
||||
var thread = util.stackFrame.triggeredThreads[i];
|
||||
if (thread.status !== Thread.STATUS_DONE) {
|
||||
var activeThreads = this.runtime.threads;
|
||||
if (activeThreads.indexOf(thread) > -1) { // @todo: A cleaner way?
|
||||
waiting = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,7 +204,6 @@ Runtime.prototype._pushThread = function (id) {
|
|||
* @param {?Thread} thread Thread object to remove from actives
|
||||
*/
|
||||
Runtime.prototype._removeThread = function (thread) {
|
||||
thread.setStatus(Thread.STATUS_DONE);
|
||||
var i = this.threads.indexOf(thread);
|
||||
if (i > -1) {
|
||||
this.glowScript(thread.topBlock, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue