From c4210cbc358d5653f5dbbba958a544625326b1f7 Mon Sep 17 00:00:00 2001 From: Free Wortley <00free@gmail.com> Date: Tue, 27 Oct 2020 12:15:59 -0700 Subject: [PATCH] Fix Node Temporal runtime --- api/runtimes/nodejs10.x/index.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/api/runtimes/nodejs10.x/index.js b/api/runtimes/nodejs10.x/index.js index c68d757e5..7bc6488f7 100644 --- a/api/runtimes/nodejs10.x/index.js +++ b/api/runtimes/nodejs10.x/index.js @@ -1,13 +1,14 @@ -const main = require("./refinery_main").main; +const main = require('./refinery_main').main; exports.handler = async (event) => { - const result = await main( - event.hasOwnProperty("block_input") ? event['block_input'] : {}, - event.hasOwnProperty("backpack") ? event['backpack'] : {} - ); - const response = { - result: result, - backpack: backpack - }; - return JSON.stringify(response) + const backpack = event.hasOwnProperty('backpack') ? event['backpack'] : {}; + const result = await main( + event.hasOwnProperty('block_input') ? event['block_input'] : {}, + backpack + ); + const response = { + result: result, + backpack: backpack + }; + return JSON.stringify(response) };