From 34fcab3ce0247834d168bda08492a71367924e8c Mon Sep 17 00:00:00 2001 From: Cori Hudson Date: Fri, 7 Oct 2022 16:07:47 -0400 Subject: [PATCH] fix: remove unnecessary if statement --- scripts/tx-push-src.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/scripts/tx-push-src.js b/scripts/tx-push-src.js index 0423ccf6..ebb33a1b 100755 --- a/scripts/tx-push-src.js +++ b/scripts/tx-push-src.js @@ -84,17 +84,15 @@ const pushSource = async function () { return; } // file not found - create it, but also give message - if (err.statusCode === 404) { - process.stdout.write(`Transifex Resource not found, creating: ${RESOURCE}\n`); - const resourceData = { - slug: RESOURCE, - name: RESOURCE, - priority: 0, // default to normal priority - i18nType: getResourceType(PROJECT, RESOURCE), - content: en - }; - await txCreateResource(PROJECT, resourceData); - } + process.stdout.write(`Transifex Resource not found, creating: ${RESOURCE}\n`); + const resourceData = { + slug: RESOURCE, + name: RESOURCE, + priority: 0, // default to normal priority + i18nType: getResourceType(PROJECT, RESOURCE), + content: en + }; + await txCreateResource(PROJECT, resourceData); process.exitCode = 0; } };