mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
⚡ Minor improvement on Uplead-Node
This commit is contained in:
parent
1428895d53
commit
d30f809e8d
|
@ -43,7 +43,7 @@ export const personFields = [
|
|||
],
|
||||
},
|
||||
},
|
||||
description: 'email address (e.g – mbenioff@salesforce.com)',
|
||||
description: 'Email address (e.g – mbenioff@salesforce.com)',
|
||||
},
|
||||
{
|
||||
displayName: 'Fist Name',
|
||||
|
@ -60,7 +60,7 @@ export const personFields = [
|
|||
],
|
||||
},
|
||||
},
|
||||
description: 'first name of the person (e.g – Marc)',
|
||||
description: 'First name of the person (e.g – Marc)',
|
||||
},
|
||||
{
|
||||
displayName: 'Last Name',
|
||||
|
|
|
@ -110,10 +110,10 @@ export class Uplead implements INodeType {
|
|||
responseData = await upleadApiRequest.call(this, 'GET', '/company-search', {}, qs);
|
||||
}
|
||||
}
|
||||
if (Array.isArray(responseData)) {
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
if (Array.isArray(responseData.data)) {
|
||||
returnData.push.apply(returnData, responseData.data as IDataObject[]);
|
||||
} else {
|
||||
returnData.push(responseData as IDataObject);
|
||||
returnData.push(responseData.data as IDataObject);
|
||||
}
|
||||
}
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
|
|
Loading…
Reference in a new issue