mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix: Fix issue with key formatting if null or undefined (#6924)
fix format private key if null or undefined
This commit is contained in:
@@ -223,7 +223,7 @@ export const keysToLowercase = <T>(headers: T) => {
|
|||||||
* @returns The formatted private key.
|
* @returns The formatted private key.
|
||||||
*/
|
*/
|
||||||
export function formatPrivateKey(privateKey: string): string {
|
export function formatPrivateKey(privateKey: string): string {
|
||||||
if (/\n/.test(privateKey)) {
|
if (!privateKey || /\n/.test(privateKey)) {
|
||||||
return privateKey;
|
return privateKey;
|
||||||
}
|
}
|
||||||
let formattedPrivateKey = '';
|
let formattedPrivateKey = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user