diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-03-27 17:44:33 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-03-27 17:50:30 -0700 |
commit | 7a36419f24f0456bb97cbc72424286cc41522647 (patch) | |
tree | d6864d301b9f395a32286bfa8037ac58f27beaed | |
parent | 281284fa5d7ccd32c7d2e6106313648da5a96548 (diff) | |
download | flatbuffers-7a36419f24f0456bb97cbc72424286cc41522647.tar.gz flatbuffers-7a36419f24f0456bb97cbc72424286cc41522647.tar.bz2 flatbuffers-7a36419f24f0456bb97cbc72424286cc41522647.zip |
Fixing closure compile compatibility when --gen-mutable is used.
Change-Id: I8bf575ba6dc795d2d2eec02fa8977dcc2594eaa6
-rw-r--r-- | js/flatbuffers.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/flatbuffers.js b/js/flatbuffers.js index a8b1941c..2e34e98b 100644 --- a/js/flatbuffers.js +++ b/js/flatbuffers.js @@ -944,9 +944,17 @@ flatbuffers.ByteBuffer.prototype.readFloat64 = function(offset) { /** * @param {number} offset - * @param {number} value + * @param {number|boolean} value */ flatbuffers.ByteBuffer.prototype.writeInt8 = function(offset, value) { + this.bytes_[offset] = /** @type {number} */(value); +}; + +/** + * @param {number} offset + * @param {number} value + */ +flatbuffers.ByteBuffer.prototype.writeUint8 = function(offset, value) { this.bytes_[offset] = value; }; |