TextEncoder allows non-Uint8Array Buffers (#596)
* TextEncoder allows non-Uint8Array Buffers * Add eslintrc to eslintignore
This commit is contained in:
@@ -23,7 +23,7 @@ import hexStripPrefix from './stripPrefix';
|
||||
*/
|
||||
export default function hexToU8a (_value?: string | null, bitLength = -1): Uint8Array {
|
||||
if (!_value) {
|
||||
return new Uint8Array([]);
|
||||
return new Uint8Array();
|
||||
}
|
||||
|
||||
assert(isHex(_value), `Expected hex value to convert, found '${_value}'`);
|
||||
|
||||
Reference in New Issue
Block a user