Skip to content

Commit

Permalink
theme mods: check for widget existence on arrow removal
Browse files Browse the repository at this point in the history
fixes issue #115
  • Loading branch information
jonian committed May 17, 2019
1 parent baba401 commit b4cabbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unite@hardpixel.eu/modules/themeMods.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var ThemeMods = new GObject.Class({

_removePanelArrows() {
for (const [name, widget] of Object.entries(Main.panel.statusArea)) {
if (name != 'aggregateMenu' && !widget._arrowHandled) {
if (name != 'aggregateMenu' && widget && !widget._arrowHandled) {
widget._arrowHandled = true;
this._toggleWidgetArrow(widget, true);
}
Expand All @@ -105,7 +105,7 @@ var ThemeMods = new GObject.Class({

_resetPanelArrows() {
for (const [name, widget] of Object.entries(Main.panel.statusArea)) {
if (name != 'aggregateMenu' && widget._arrowHandled) {
if (name != 'aggregateMenu' && widget && widget._arrowHandled) {
this._toggleWidgetArrow(widget, false);
delete widget._arrowHandled;
}
Expand Down

0 comments on commit b4cabbc

Please sign in to comment.