Use braces to make if-clauses better readable.

merge-requests/222/head
Jens Lody 6 years ago
parent 401d68e277
commit 160ec29814
  1. 28
      src/extension.js

@ -1170,22 +1170,28 @@ const OpenweatherMenuButton = new Lang.Class({
}, },
getIconType: function(icon_name) { getIconType: function(icon_name) {
if (!icon_name) if (!icon_name) {
if (this._getIconType) if (this._getIconType) {
return "-symbolic"; return "-symbolic";
else } else {
return ""; return "";
}
}
if (this._getIconType) if (this._getIconType) {
if (String(icon_name).search("-symbolic") != -1) if (String(icon_name).search("-symbolic") != -1) {
return icon_name; return icon_name;
else } else {
return icon_name + "-symbolic"; return icon_name + "-symbolic";
else }
if (String(icon_name).search("-symbolic") != -1) } else {
return String(icon_name).replace("-symbolic", ""); if (String(icon_name).search("-symbolic") != -1) {
else return String(icon_name).replace("-symbolic", "");
return icon_name; } else {
return icon_name;
}
}
}, },
load_json_async: function(url, params, fun) { load_json_async: function(url, params, fun) {

Loading…
Cancel
Save