Skip to content

Commit

Permalink
🐛 Support ServiceNow sysparm_fields as string
Browse files Browse the repository at this point in the history
  • Loading branch information
pemontto committed Jan 20, 2022
1 parent 52a732e commit b754b96
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand All @@ -483,7 +483,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand All @@ -504,7 +504,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand All @@ -525,7 +525,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand Down Expand Up @@ -564,7 +564,7 @@ export class ServiceNow implements INodeType {
const id = this.getNodeParameter('id', i) as string;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand All @@ -576,7 +576,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand Down Expand Up @@ -639,7 +639,7 @@ export class ServiceNow implements INodeType {
const id = this.getNodeParameter('id', i) as string;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand All @@ -652,7 +652,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand Down Expand Up @@ -714,7 +714,7 @@ export class ServiceNow implements INodeType {
const getOption = this.getNodeParameter('getOption', i) as string;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand All @@ -735,7 +735,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand Down Expand Up @@ -765,7 +765,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand All @@ -786,7 +786,7 @@ export class ServiceNow implements INodeType {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
qs = this.getNodeParameter('options', i) as IDataObject;

if (qs.sysparm_fields) {
if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
qs.sysparm_fields = (qs.sysparm_fields as string[]).join(',');
}

Expand Down

0 comments on commit b754b96

Please sign in to comment.