Fixed missing TypeArray slice on constrained environments.

This commit is contained in:
Richard Moore 2019-02-04 16:03:45 -05:00
parent 429af2c40d
commit 14484e566e
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295
2 changed files with 2 additions and 2 deletions

@ -130,7 +130,7 @@ export class BaseX {
bytes.push(0) bytes.push(0)
} }
return new Uint8Array(bytes.reverse()) return arrayify(new Uint8Array(bytes.reverse()))
} }
} }

@ -40,7 +40,7 @@ function addSlice(array: Uint8Array): Uint8Array {
array.slice = function() { array.slice = function() {
var args = Array.prototype.slice.call(arguments); var args = Array.prototype.slice.call(arguments);
return new Uint8Array(Array.prototype.slice.apply(array, args)); return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));
} }
return array; return array;