Use braces to make if-clauses better readable.

merge-requests/222/head
Jens Lody 6 years ago
parent 401d68e277
commit 160ec29814
  1. 24
      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)
}
} else {
if (String(icon_name).search("-symbolic") != -1) {
return String(icon_name).replace("-symbolic", "");
else
} else {
return icon_name;
}
}
},
load_json_async: function(url, params, fun) {

Loading…
Cancel
Save