Skip to content

Commit 2be36d3

Browse files
committed
fix regexp
1 parent ed073ef commit 2be36d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

playground/polyfill-core.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function hexToUint8Array(string) {
164164
if (string.length % 2 !== 0) {
165165
throw new SyntaxError('string should be an even number of characters');
166166
}
167-
if (/[^0-9a-zA-Z]/.test(string)) {
167+
if (/[^0-9a-fA-F]/.test(string)) {
168168
throw new SyntaxError('string should only contain hex characters');
169169
}
170170
let out = new Uint8Array(string.length / 2);

0 commit comments

Comments
 (0)