From 66bda4713e64e4c133e8fb7a49726288f5b29417 Mon Sep 17 00:00:00 2001 From: fusagiko / takayamaki <24884114+takayamaki@users.noreply.github.com> Date: Thu, 20 Apr 2023 00:46:46 +0900 Subject: [PATCH] [Glitch] Allow `==` when null checking Port c1a7e38d2b9504fe06716a56a1f6193686026c16 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/short_number.jsx | 3 --- app/javascript/flavours/glitch/utils/numbers.js | 1 - 2 files changed, 4 deletions(-) diff --git a/app/javascript/flavours/glitch/components/short_number.jsx b/app/javascript/flavours/glitch/components/short_number.jsx index 535c17727d..861d0bc589 100644 --- a/app/javascript/flavours/glitch/components/short_number.jsx +++ b/app/javascript/flavours/glitch/components/short_number.jsx @@ -32,17 +32,14 @@ function ShortNumber({ value, renderer, children }) { const shortNumber = toShortNumber(value); const [, division] = shortNumber; - // eslint-disable-next-line eqeqeq if (children != null && renderer != null) { console.warn('Both renderer prop and renderer as a child provided. This is a mistake and you really should fix that. Only renderer passed as a child will be used.'); } - // eslint-disable-next-line eqeqeq const customRenderer = children != null ? children : renderer; const displayNumber = ; - // eslint-disable-next-line eqeqeq return customRenderer != null ? customRenderer(displayNumber, pluralReady(value, division)) : displayNumber; diff --git a/app/javascript/flavours/glitch/utils/numbers.js b/app/javascript/flavours/glitch/utils/numbers.js index 6ef563ad8f..fa3d58fad1 100644 --- a/app/javascript/flavours/glitch/utils/numbers.js +++ b/app/javascript/flavours/glitch/utils/numbers.js @@ -60,7 +60,6 @@ export function toShortNumber(sourceNumber) { * // => 1790 */ export function pluralReady(sourceNumber, division) { - // eslint-disable-next-line eqeqeq if (division == null || division < DECIMAL_UNITS.HUNDRED) { return sourceNumber; }