From 81a120a92f21996b175c994b2f995c3bc60700bc Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Wed, 29 Nov 2023 14:13:55 -0800 Subject: [PATCH] Change ?? (ts-only) to || (js) --- src/rails-status.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rails-status.js b/src/rails-status.js index c88f21a3b..2b067a45a 100644 --- a/src/rails-status.js +++ b/src/rails-status.js @@ -9,7 +9,7 @@ const statusOrder = [ /** * Get the latest status, based on the order of precedence - * + * * @param {readonly string[]} statuses list of status to pick from * @returns {string | null} latest status if valid, `null` otherwise */ @@ -17,12 +17,12 @@ export const latestStatusFrom = (statuses) => { return statuses .filter(status => statusOrder.includes(status)) .sort(compareStatuses) - .at(-1) ?? null + .at(-1) || null } /** * Compare function, which is compatible with #Array.sort. - * + * * @param {string} first * @param {string} second * @returns {1 | 0 | -1} sorting order