Minor improvement on Uplead-Node

This commit is contained in:
Jan Oberhauser 2020-01-28 21:39:59 -08:00
parent 1428895d53
commit d30f809e8d
2 changed files with 5 additions and 5 deletions

View file

@ -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', 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', displayName: 'Last Name',

View file

@ -110,10 +110,10 @@ export class Uplead implements INodeType {
responseData = await upleadApiRequest.call(this, 'GET', '/company-search', {}, qs); responseData = await upleadApiRequest.call(this, 'GET', '/company-search', {}, qs);
} }
} }
if (Array.isArray(responseData)) { if (Array.isArray(responseData.data)) {
returnData.push.apply(returnData, responseData as IDataObject[]); returnData.push.apply(returnData, responseData.data as IDataObject[]);
} else { } else {
returnData.push(responseData as IDataObject); returnData.push(responseData.data as IDataObject);
} }
} }
return [this.helpers.returnJsonArray(returnData)]; return [this.helpers.returnJsonArray(returnData)];