From 814afb546c4a01a0db929d2376bac173ef521dfe Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:51:21 +0000 Subject: [PATCH] [getsentry/action-github-commit] Auto commit --- scripts/lint-404s/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/lint-404s/main.ts b/scripts/lint-404s/main.ts index 8ec5f62ff794a..9943e4a42561e 100644 --- a/scripts/lint-404s/main.ts +++ b/scripts/lint-404s/main.ts @@ -2,8 +2,8 @@ import {readFileSync} from 'fs'; import path, {dirname} from 'path'; -import {fileURLToPath} from 'url'; import readline from 'readline'; +import {fileURLToPath} from 'url'; const baseURL = 'http://localhost:3000/'; type Link = {href: string; innerText: string}; @@ -155,12 +155,12 @@ const humanReadableMs = (ms: number) => { const oneMinute = oneSecond * 60; if (ms < oneSecond) { return `${ms.toFixed(1)} ms`; - } else if (ms < oneMinute) { + } + if (ms < oneMinute) { return `${(ms / 1000).toFixed(1)} s`; - } else { - // show minutes and seconds - return `${Math.floor(ms / oneMinute)} m ${((ms % oneMinute) / 1000).toFixed(1)} s`; } + // show minutes and seconds + return `${Math.floor(ms / oneMinute)} m ${((ms % oneMinute) / 1000).toFixed(1)} s`; }; main().then(has404s => {