From 7eb97612ba1a744923350253d88aabae38099aae Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 31 Oct 2018 03:18:54 +0000 Subject: [PATCH] [misc] Remove unnecessary ternary spotted by Coverity (#4663) --- src/lib/duration/create.js | 2 +- src/locale/sl.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/duration/create.js b/src/lib/duration/create.js index 346814816..7d1d05212 100644 --- a/src/lib/duration/create.js +++ b/src/lib/duration/create.js @@ -48,7 +48,7 @@ export function createDuration (input, key) { ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match }; } else if (!!(match = isoRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1; + sign = (match[1] === '-') ? -1 : 1; duration = { y : parseIso(match[2], sign), M : parseIso(match[3], sign), diff --git a/src/locale/sl.js b/src/locale/sl.js index b37b7ed2c..8ece81bfa 100644 --- a/src/locale/sl.js +++ b/src/locale/sl.js @@ -17,7 +17,7 @@ function processRelativeTime(number, withoutSuffix, key, isFuture) { } else if (number < 5) { result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; } else { - result += withoutSuffix || isFuture ? 'sekund' : 'sekund'; + result += 'sekund'; } return result; case 'm': -- 2.47.3