Skip to content

Commit

Permalink
Fixing problem with setter in webkit-audiocontext-patch. Fixes #44.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunyatasattva committed Jul 16, 2017
1 parent 61c2dd2 commit 0b2c96f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/lib/webkit-audiocontext-patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ module.exports = function(){

Object.defineProperty(OscillatorNode.prototype, "type", {
get: function() {
return ["sine", "square", "sawtooth", "triangle", "custom"][this.type];
return ["sine", "square", "sawtooth", "triangle", "custom"][this._type];
},
set: function(type) {
this.type = OscillatorNode.prototype[type.toUpperCase()] || type;
this._type = OscillatorNode.prototype[type.toUpperCase()] || type;
}
});
}
Expand Down

0 comments on commit 0b2c96f

Please sign in to comment.