Skip to content

Commit

Permalink
fix regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed Nov 24, 2023
1 parent ed073ef commit 2be36d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playground/polyfill-core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export function hexToUint8Array(string) {
if (string.length % 2 !== 0) {
throw new SyntaxError('string should be an even number of characters');
}
if (/[^0-9a-zA-Z]/.test(string)) {
if (/[^0-9a-fA-F]/.test(string)) {
throw new SyntaxError('string should only contain hex characters');
}
let out = new Uint8Array(string.length / 2);
Expand Down

0 comments on commit 2be36d3

Please sign in to comment.