mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-14 15:28:50 -04:00
Check for runtime
This commit is contained in:
parent
283804c21c
commit
eca66e9dde
1 changed files with 3 additions and 1 deletions
|
@ -18,8 +18,10 @@ class Scratch3SoundBlocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
this._onTargetCreated = this._onTargetCreated.bind(this);
|
this._onTargetCreated = this._onTargetCreated.bind(this);
|
||||||
|
if (this.runtime) {
|
||||||
runtime.on('targetWasCreated', this._onTargetCreated);
|
runtime.on('targetWasCreated', this._onTargetCreated);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The key to load & store a target's sound-related state.
|
* The key to load & store a target's sound-related state.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue