From 160ec2981408347f01e494fe4ac2aec78e065d0e Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Tue, 6 Nov 2018 06:08:57 +0100 Subject: [PATCH] Use braces to make if-clauses better readable. --- src/extension.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/extension.js b/src/extension.js index fc37c1f..e13545b 100644 --- a/src/extension.js +++ b/src/extension.js @@ -1170,22 +1170,28 @@ const OpenweatherMenuButton = new Lang.Class({ }, getIconType: function(icon_name) { - if (!icon_name) - if (this._getIconType) + if (!icon_name) { + if (this._getIconType) { + return "-symbolic"; - else + } else { return ""; + } + } - if (this._getIconType) - if (String(icon_name).search("-symbolic") != -1) + if (this._getIconType) { + if (String(icon_name).search("-symbolic") != -1) { return icon_name; - else + } else { return icon_name + "-symbolic"; - else - if (String(icon_name).search("-symbolic") != -1) - return String(icon_name).replace("-symbolic", ""); - else - return icon_name; + } + } else { + if (String(icon_name).search("-symbolic") != -1) { + return String(icon_name).replace("-symbolic", ""); + } else { + return icon_name; + } + } }, load_json_async: function(url, params, fun) {