From 4ed415bc245c211e378e0db2514a1f844999af40 Mon Sep 17 00:00:00 2001 From: Florian Richter Date: Sat, 1 Aug 2020 18:23:43 +0200 Subject: [PATCH] fix: Fixed argument check --- dist/index.js | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index bc23083..9b7b774 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7,7 +7,7 @@ async function runAction() { const context = github_1.getContext(); const key = core.getInput("key"); const value = core.getInput("value"); - if (!!key || Number.isNaN(Number.parseFloat(value))) { + if (!key || Number.isNaN(Number.parseFloat(value))) { throw new Error("Invalid arguments delivered"); } const path = `data/values/${new Date().getUTCFullYear()}/${key}.json`; diff --git a/src/index.ts b/src/index.ts index 2ba6fd6..a958e77 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ async function runAction() { const context = getContext(); const key = core.getInput("key"); const value = core.getInput("value"); - if (!!key || Number.isNaN(Number.parseFloat(value))) { + if (!key || Number.isNaN(Number.parseFloat(value))) { throw new Error("Invalid arguments delivered"); } const path = `data/values/${new Date().getUTCFullYear()}/${key}.json`;