mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
ensure this.workerClass exists before instanceof check
This avoids an error I was running into in a node environment: ``` TypeError: Right-hand side of 'instanceof' is not an object ```
This commit is contained in:
parent
02c6002bb2
commit
9b8a8647f0
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ class CentralDispatch extends SharedDispatch {
|
||||||
const provider = this.services[service];
|
const provider = this.services[service];
|
||||||
return provider && {
|
return provider && {
|
||||||
provider,
|
provider,
|
||||||
isRemote: provider instanceof this.workerClass
|
isRemote: Boolean(this.workerClass && provider instanceof this.workerClass)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue