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