Skip to content

Commit 1dd603b

Browse files
authored
Merge pull request #28 from Code-Hex/fix/uint8array-array-buffer
fixed compilation error
2 parents 633dfbf + 9091791 commit 1dd603b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/base64.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ export const decodeBase64 = (str: string): Uint8Array => {
2727
};
2828

2929
const jsonUTF8Stringify = (obj: any): Uint8Array => utf8Encoder.encode(JSON.stringify(obj));
30-
export const encodeObjectBase64Url = (obj: any): string => encodeBase64Url(jsonUTF8Stringify(obj));
30+
export const encodeObjectBase64Url = (obj: any): string => encodeBase64Url(jsonUTF8Stringify(obj).buffer);

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2022",
3+
"target": "esnext",
44
"module": "commonjs",
55
"declaration": true,
66
"moduleResolution": "node",

0 commit comments

Comments
 (0)