From 0ea0bc85deba6644d6de5cc385b6b09c06b6015d Mon Sep 17 00:00:00 2001 From: sjgjones Date: Mon, 14 Nov 2022 12:12:06 +0000 Subject: [PATCH] VTT-4934 btoa issue (#245) Co-authored-by: stephen jones --- package.json | 2 +- src/client/al-api-client.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f3d67dbd..dd276728 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@al/core", - "version": "1.0.194", + "version": "1.0.195", "description": "Node Enterprise Packages for Alert Logic (NEPAL) Core Library", "main": "./dist/index.cjs.js", "types": "./dist/index.d.ts", diff --git a/src/client/al-api-client.ts b/src/client/al-api-client.ts index c2abfbef..1ef2e7a5 100644 --- a/src/client/al-api-client.ts +++ b/src/client/al-api-client.ts @@ -584,12 +584,9 @@ export class AlApiClient implements AlValidationSchemaProvider } /** - * Converts a string input to its base64 encoded equivalent. Uses browser-provided btoa if available, or 3rd party btoa module as a fallback. + * Converts a string input to its base64 encoded equivalent. */ public base64Encode( data:string ):string { - if ( this.isBrowserBased() && window.btoa ) { - return btoa( data ); - } let utf8Data = unescape( encodeURIComponent( data ) ); // forces conversion to utf8 from utf16, because... not sure why let bytes = []; for ( let i = 0; i < utf8Data.length; i++ ) {