* Fix Audio stop() Fix stop() When source is null, the method will throw an Exception * Update Audio.js Co-authored-by: mrdoob <[email protected]>
@@ -169,8 +169,13 @@ class Audio extends Object3D {
this._progress = 0;
- this.source.stop();
- this.source.onended = null;
+ if ( this.source !== null ) {
+
+ this.source.stop();
+ this.source.onended = null;
+ }
this.isPlaying = false;
return this;