Skip to content

Commit 0ea0bc8

Browse files
sjgjonesstephen jones
andauthored
VTT-4934 btoa issue (#245)
Co-authored-by: stephen jones <[email protected]>
1 parent b89957c commit 0ea0bc8

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@al/core",
3-
"version": "1.0.194",
3+
"version": "1.0.195",
44
"description": "Node Enterprise Packages for Alert Logic (NEPAL) Core Library",
55
"main": "./dist/index.cjs.js",
66
"types": "./dist/index.d.ts",

src/client/al-api-client.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,9 @@ export class AlApiClient implements AlValidationSchemaProvider
584584
}
585585

586586
/**
587-
* Converts a string input to its base64 encoded equivalent. Uses browser-provided btoa if available, or 3rd party btoa module as a fallback.
587+
* Converts a string input to its base64 encoded equivalent.
588588
*/
589589
public base64Encode( data:string ):string {
590-
if ( this.isBrowserBased() && window.btoa ) {
591-
return btoa( data );
592-
}
593590
let utf8Data = unescape( encodeURIComponent( data ) ); // forces conversion to utf8 from utf16, because... not sure why
594591
let bytes = [];
595592
for ( let i = 0; i < utf8Data.length; i++ ) {

0 commit comments

Comments
 (0)