Skip to content

Commit

Permalink
🐛 [Sound] Do not call .stop() unless started
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Dec 6, 2023
1 parent f1d7c76 commit 1c6ff82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class Sound extends EmittenCommon<SoundEventMap> {

stop() {
this.#setState('stopping');
this.#source.stop();
if (this.#started) this.#source.stop();
this.#source.disconnect();
this.empty();

Expand Down

0 comments on commit 1c6ff82

Please sign in to comment.