mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Check for runtime.currentStepTime is null
This commit is contained in:
parent
0a239005a9
commit
33966ba582
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ class Scratch3SensingBlocks {
|
|||
|
||||
getLoudness () {
|
||||
if (typeof this.runtime.audioEngine === 'undefined') return -1;
|
||||
if (typeof this.runtime.currentStepTime === 'undefined') return -1;
|
||||
if (this.runtime.currentStepTime === null) return -1;
|
||||
|
||||
// Only measure loudness once per step
|
||||
const timeSinceLoudness = this._timer.time() - this._cachedLoudnessTimestamp;
|
||||
|
|
Loading…
Reference in a new issue