Fixed missing TypeArray slice on constrained environments.
This commit is contained in:
parent
429af2c40d
commit
14484e566e
@ -130,7 +130,7 @@ export class BaseX {
|
||||
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() {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user