Skip to content

Commit 2471497

Browse files
Matt Gauntmmermerkaya
authored andcommitted
Update base64-to-array-buffer.ts (#721)
Use global atob instead of window so it works in SW.
1 parent 9d41b96 commit 2471497

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/messaging/src/helpers/base64-to-array-buffer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function base64ToArrayBuffer(base64String: string): Uint8Array {
2020
.replace(/\-/g, '+')
2121
.replace(/_/g, '/');
2222

23-
const rawData = window.atob(base64);
23+
const rawData = atob(base64);
2424
const outputArray = new Uint8Array(rawData.length);
2525

2626
for (let i = 0; i < rawData.length; ++i) {

0 commit comments

Comments
 (0)