Skip to content

Commit

Permalink
fix: fix conversion of empty hex string
Browse files Browse the repository at this point in the history
  • Loading branch information
pwespi committed Jul 17, 2022
1 parent ad33742 commit 28f4f69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/conversion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function hexStringToDataView(value: string): DataView {
const numbers: number[] = value
.trim()
.split(' ')
.filter((e) => e !== '')
.map((s) => parseInt(s, 16));
return numbersToDataView(numbers);
}
Expand Down

0 comments on commit 28f4f69

Please sign in to comment.