Skip to content

Commit

Permalink
Merge pull request #11 from warpdesign/patch-1
Browse files Browse the repository at this point in the history
Do not crash if non-prefixed AudioContext isn't available
  • Loading branch information
developit committed Aug 31, 2018
2 parents 74d787c + 6dd7ea0 commit eca684d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if (typeof AudioWorkletNode !== 'function') {
return scriptProcessor;
};

Object.defineProperty(AudioContext.prototype, 'audioWorklet', {
Object.defineProperty((window.AudioContext||webkitAudioContext).prototype, 'audioWorklet', {
get () {
return this.$$audioWorklet || (this.$$audioWorklet = new window.AudioWorklet(this));
}
Expand Down

0 comments on commit eca684d

Please sign in to comment.