mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-23 18:41:48 -08: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:
parent
e83b93f293
commit
4e4a3cf7ab
|
@ -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 = '';
|
||||||
|
|
Loading…
Reference in a new issue