From a2db4db9638bd6ef6a1e504c5fe698d5ae1d2436 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sun, 9 Dec 2018 03:43:58 +0900 Subject: [PATCH] Eliminate if-statement (#3561) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Acid Chicken (硫酸鶏) --- src/client/app/common/views/filters/number.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/client/app/common/views/filters/number.ts b/src/client/app/common/views/filters/number.ts index 08f9fea805..8c799d9442 100644 --- a/src/client/app/common/views/filters/number.ts +++ b/src/client/app/common/views/filters/number.ts @@ -1,6 +1,3 @@ import Vue from 'vue'; -Vue.filter('number', (n) => { - if (n == null) return 'N/A'; - return n.toLocaleString(); -}); +Vue.filter('number', n => n == null ? 'N/A' : n.toLocaleString());