Null check
This commit is contained in:
parent
2d7a108e79
commit
e87e1767b5
@ -22,7 +22,7 @@ namespace pxsim.SoundMethods {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function play(buf: RefBuffer, volume: number) {
|
export function play(buf: RefBuffer, volume: number) {
|
||||||
if (numSoundsPlaying >= soundsLimit) {
|
if (!buf || numSoundsPlaying >= soundsLimit) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
return new Promise<void>(resolve => {
|
return new Promise<void>(resolve => {
|
||||||
|
Loading…
Reference in New Issue
Block a user