mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
determine _pushThread defaults without Object.assign
This commit is contained in:
parent
9135780c55
commit
c3f9e0945b
1 changed files with 3 additions and 8 deletions
|
@ -1434,16 +1434,11 @@ class Runtime extends EventEmitter {
|
|||
* @return {!Thread} The newly created thread.
|
||||
*/
|
||||
_pushThread (id, target, opts) {
|
||||
opts = Object.assign({
|
||||
stackClick: false,
|
||||
updateMonitor: false
|
||||
}, opts);
|
||||
|
||||
const thread = new Thread(id);
|
||||
thread.target = target;
|
||||
thread.stackClick = opts.stackClick;
|
||||
thread.updateMonitor = opts.updateMonitor;
|
||||
thread.blockContainer = opts.updateMonitor ?
|
||||
thread.stackClick = Boolean(opts && opts.stackClick);
|
||||
thread.updateMonitor = Boolean(opts && opts.updateMonitor);
|
||||
thread.blockContainer = thread.updateMonitor ?
|
||||
this.monitorBlocks :
|
||||
target.blocks;
|
||||
|
||||
|
|
Loading…
Reference in a new issue