Skip to content

Commit

Permalink
add defense
Browse files Browse the repository at this point in the history
  • Loading branch information
bosscheng committed Feb 14, 2022
1 parent 1fb6863 commit a15f321
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
31 changes: 25 additions & 6 deletions demo/public/jessibuca.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/public/jessibuca.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jessibuca.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/player/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default class Player extends Emitter {
}

get volume() {
return this.audio.volume;
return this.audio && this.audio.volume;
}

set volume(value) {
Expand Down Expand Up @@ -209,7 +209,7 @@ export default class Player extends Emitter {
}

get recording() {
return this.recorder.recording;
return this.recorder && this.recorder.recording;
}

set audioTimestamp(value) {
Expand Down

1 comment on commit a15f321

@vercel
Copy link

@vercel vercel bot commented on a15f321 Feb 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.