diff options
Diffstat (limited to 'std/encoding/base32_test.ts')
-rw-r--r-- | std/encoding/base32_test.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/encoding/base32_test.ts b/std/encoding/base32_test.ts index eb51e44ab..28550d57a 100644 --- a/std/encoding/base32_test.ts +++ b/std/encoding/base32_test.ts @@ -6,7 +6,7 @@ import { encode, decode } from "./base32.ts"; // Lifted from https://stackoverflow.com/questions/38987784 const fromHexString = (hexString: string): Uint8Array => - new Uint8Array(hexString.match(/.{1,2}/g).map(byte => parseInt(byte, 16))); + new Uint8Array(hexString.match(/.{1,2}/g)!.map(byte => parseInt(byte, 16))); const toHexString = (bytes: Uint8Array): string => bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, "0"), ""); |