From 0b2c96f84bdbd7744b727784cbb3f708eb96d970 Mon Sep 17 00:00:00 2001 From: Veren Date: Sun, 16 Jul 2017 22:46:01 +0200 Subject: [PATCH] Fixing problem with setter in webkit-audiocontext-patch. Fixes #44. --- assets/js/lib/webkit-audiocontext-patch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/lib/webkit-audiocontext-patch.js b/assets/js/lib/webkit-audiocontext-patch.js index 2270658..a8e8bc1 100644 --- a/assets/js/lib/webkit-audiocontext-patch.js +++ b/assets/js/lib/webkit-audiocontext-patch.js @@ -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; } }); }