diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index 13d7abf..6ca8618 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -954,6 +954,7 @@ var qrcodegen = new function() { * This constructor creates an empty bit buffer (length 0). */ function BitBuffer() { + Array.call(this); // Packs this buffer's bits into bytes in big endian, // padding with '0' bit values, and returns the new array. @@ -978,5 +979,6 @@ var qrcodegen = new function() { } BitBuffer.prototype = Object.create(Array.prototype); + BitBuffer.prototype.constructor = BitBuffer; };