Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Fixed typo in decodeB64StringToArrayBuffer

Andrew Bastinddb0d6540e7b
diff --git a/helpers/utils/b64.js b/helpers/utils/b64.js
index 8155c4fdf..51869b6d2 100644
--- a/helpers/utils/b64.js
+++ b/helpers/utils/b64.js
@@ -1,5 +1,5 @@
export const decodeB64StringToArrayBuffer = (input) => {
- const bytes = Math.floor((input / 4) * 3)
+ const bytes = Math.floor((input.length / 4) * 3)
const ab = new ArrayBuffer(bytes)
const uarray = new Uint8Array(ab)