Skip to content

Commit

Permalink
Fixed AudioContext.close() (#998)
Browse files Browse the repository at this point in the history
Fixed wrong check close function in AudioContext instance.
  • Loading branch information
meefik authored and mspae committed Feb 17, 2017
1 parent 51a92d2 commit b166f91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webaudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ WaveSurfer.WebAudio = {
// not passed in as a parameter
if (!this.params.audioContext) {
// check if browser supports AudioContext.close()
if (typeof this.ac.close() !== 'undefined') {
if (typeof this.ac.close === 'function') {
this.ac.close();
}
}
Expand Down

0 comments on commit b166f91

Please sign in to comment.