mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
🐛 Fix Clockify Trigger bug (#1778)
* Fix the empty results bug * Fix return value
This commit is contained in:
parent
c739a498f1
commit
6460ce3965
|
@ -24,7 +24,7 @@ export class ClockifyTrigger implements INodeType {
|
|||
displayName: 'Clockify Trigger',
|
||||
icon: 'file:clockify.png',
|
||||
name: 'clockifyTrigger',
|
||||
group: ['trigger'],
|
||||
group: [ 'trigger' ],
|
||||
version: 1,
|
||||
description: 'Watches Clockify For Events',
|
||||
defaults: {
|
||||
|
@ -32,7 +32,7 @@ export class ClockifyTrigger implements INodeType {
|
|||
color: '#000000',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: ['main'],
|
||||
outputs: [ 'main' ],
|
||||
credentials: [
|
||||
{
|
||||
name: 'clockifyApi',
|
||||
|
@ -109,7 +109,7 @@ export class ClockifyTrigger implements INodeType {
|
|||
qs.start = webhookData.lastTimeChecked;
|
||||
qs.end = moment().tz(workflowTimezone).format('YYYY-MM-DDTHH:mm:ss') + 'Z';
|
||||
qs.hydrated = true;
|
||||
qs['in-progress'] = false;
|
||||
qs[ 'in-progress' ] = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -117,8 +117,8 @@ export class ClockifyTrigger implements INodeType {
|
|||
webhookData.lastTimeChecked = qs.end;
|
||||
|
||||
if (Array.isArray(result) && result.length !== 0) {
|
||||
result = [this.helpers.returnJsonArray(result)];
|
||||
return [ this.helpers.returnJsonArray(result) ];
|
||||
}
|
||||
return result;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue