assert cleanups (#957)

This commit is contained in:
Jaco
2021-04-22 13:13:41 +02:00
committed by GitHub
parent a52a6253b5
commit bbadfbebfa
15 changed files with 27 additions and 29 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export function u8aToU8a (value?: number[] | Buffer | Uint8Array | string | null
return new Uint8Array(value);
}
assert(isU8a(value), `Unable to convert ${value.toString()} (typeof ${typeof value}) to a Uint8Array`);
assert(isU8a(value), () => `Unable to convert ${value.toString()} (typeof ${typeof value}) to a Uint8Array`);
return value;
}