@integration-app/sdk
Advanced tools
Comparing version 0.1.38 to 0.1.39
@@ -210,7 +210,5 @@ "use strict"; | ||
async getFlowRunOutput(flowRun) { | ||
const latestNodeRunId = flowRun.nodeRuns | ||
.map((nodeRun) => nodeRun.id) | ||
.sort() | ||
.pop(); | ||
if (latestNodeRunId) { | ||
var _a; | ||
if (((_a = flowRun.nodeRuns) === null || _a === void 0 ? void 0 : _a.length) > 0) { | ||
const latestNodeRunId = flowRun.nodeRuns[flowRun.nodeRuns.length - 1].id; | ||
return this.getFlowNodeRunOutputRecords(latestNodeRunId); | ||
@@ -217,0 +215,0 @@ } |
{ | ||
"name": "@integration-app/sdk", | ||
"version": "0.1.38", | ||
"version": "0.1.39", | ||
"description": "JavaScript SDK for Integration.app", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -286,7 +286,6 @@ import Pusher, { Channel } from 'pusher-js' | ||
public async getFlowRunOutput(flowRun: any): Promise<any> { | ||
const latestNodeRunId = flowRun.nodeRuns | ||
.map((nodeRun: any) => nodeRun.id) | ||
.sort() | ||
.pop() | ||
if (latestNodeRunId) { | ||
if (flowRun.nodeRuns?.length > 0) { | ||
// We assume that node runs are ordered, which should be the case because | ||
// they come ordered from the API. | ||
const latestNodeRunId = flowRun.nodeRuns[flowRun.nodeRuns.length - 1].id | ||
return this.getFlowNodeRunOutputRecords(latestNodeRunId) | ||
@@ -293,0 +292,0 @@ } else { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1002895
100
11818