From 93df97bdb8b9dbaf43325c193ffd87149ac25639 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Fri, 17 Nov 2023 12:02:44 +0530 Subject: [PATCH] changed ternary to if else --- packages/contentstack-bulk-publish/src/util/retryfailed.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/contentstack-bulk-publish/src/util/retryfailed.js b/packages/contentstack-bulk-publish/src/util/retryfailed.js index d444a4637c..c8c1494f94 100644 --- a/packages/contentstack-bulk-publish/src/util/retryfailed.js +++ b/packages/contentstack-bulk-publish/src/util/retryfailed.js @@ -6,7 +6,11 @@ module.exports = async (filename, queue, Type) => { if (logs.file.length > 0) { logs.file.forEach(async (log) => { const stackOptions = {host: log.message.host }; - log.message.alias?stackOptions["alias"] = log.message.alias:stackOptions["stackApiKey"] = log.message.api_key; + if(log.message.alias) { + stackOptions["alias"] = log.message.alias + } else { + stackOptions["stackApiKey"] = log.message.api_key + } if (Type === 'bulk') { log.message.options.stack = await getStack(stackOptions); queue.Enqueue(log.message.options);