Skip to content

Commit 9091791

Browse files
committed
fixed compilation error
fixed "Argument of type 'Uint8Array<ArrayBufferLike>' is not assignable to parameter of type 'ArrayBufferLike'"
1 parent 633dfbf commit 9091791

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/base64.ts

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)