mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -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.
|
* @return {!Thread} The newly created thread.
|
||||||
*/
|
*/
|
||||||
_pushThread (id, target, opts) {
|
_pushThread (id, target, opts) {
|
||||||
opts = Object.assign({
|
|
||||||
stackClick: false,
|
|
||||||
updateMonitor: false
|
|
||||||
}, opts);
|
|
||||||
|
|
||||||
const thread = new Thread(id);
|
const thread = new Thread(id);
|
||||||
thread.target = target;
|
thread.target = target;
|
||||||
thread.stackClick = opts.stackClick;
|
thread.stackClick = Boolean(opts && opts.stackClick);
|
||||||
thread.updateMonitor = opts.updateMonitor;
|
thread.updateMonitor = Boolean(opts && opts.updateMonitor);
|
||||||
thread.blockContainer = opts.updateMonitor ?
|
thread.blockContainer = thread.updateMonitor ?
|
||||||
this.monitorBlocks :
|
this.monitorBlocks :
|
||||||
target.blocks;
|
target.blocks;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue