Skip to content

Commit

Permalink
changed ternary to if else
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed Nov 17, 2023
1 parent 82e9fc5 commit 93df97b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/contentstack-bulk-publish/src/util/retryfailed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 93df97b

Please sign in to comment.