From 7c653b708f47ce9b93cddc8d5c2839cfb6e321a7 Mon Sep 17 00:00:00 2001 From: Stefan Aichholzer Date: Tue, 20 Sep 2016 09:41:33 +0800 Subject: [PATCH] Irrelevant `else` There is no need to use the `else` since the `if` statement returns implicitly. --- client/lib/handleError.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/lib/handleError.js b/client/lib/handleError.js index a0a8f3142c1..2bd1fec80f6 100644 --- a/client/lib/handleError.js +++ b/client/lib/handleError.js @@ -9,7 +9,7 @@ this.handleError = function(error, useToastr = true) { if (useToastr) { return toastr.error(TAPi18n.__(error.error, error.details), error.details && error.details.errorTitle ? TAPi18n.__(error.details.errorTitle) : null); - } else { - return TAPi18n.__(error.error, error.details); } + + return TAPi18n.__(error.error, error.details); };