mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
⚡ Simplify code
This commit is contained in:
parent
f6938a8d48
commit
40b76fd746
|
@ -163,7 +163,7 @@ export function getDefaultFields(sobject: string) {
|
|||
export function getQuery(options: IDataObject, sobject: string, returnAll: boolean, limit = 0) {
|
||||
const fields: string[] = [];
|
||||
if (options.fields) {
|
||||
fields.push.apply(fields, options.fields.toString().split(','));
|
||||
fields.push.apply(fields, options.fields as string[]);
|
||||
} else {
|
||||
fields.push.apply(fields, (getDefaultFields(sobject) as string || 'id').split(','));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue