From ab8d4dc5607787fce75cb4d32959758d5dbb5759 Mon Sep 17 00:00:00 2001 From: jokebookservice1 Date: Mon, 17 Sep 2018 22:07:26 +0100 Subject: [PATCH] style(util): Address linting issues --- src/util/cast.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/util/cast.js b/src/util/cast.js index 19d169999..250132905 100644 --- a/src/util/cast.js +++ b/src/util/cast.js @@ -118,13 +118,12 @@ class Cast { // Scratch compares strings as case insensitive. const s1 = String(v1).toLowerCase(); const s2 = String(v2).toLowerCase(); - if(s1 < s2) { - return -1 + if (s1 < s2) { + return -1; } else if (s1 > s2) { - return 1 - } else { - return 0 + return 1; } + return 0; } // Compare as numbers. return n1 - n2;