Skip to content

Commit

Permalink
buttons: check if buttons exist before forEach
Browse files Browse the repository at this point in the history
fix #313
  • Loading branch information
jonian committed Feb 5, 2023
1 parent 6ba50e7 commit eb8bdd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion [email protected]/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ var WindowControls = GObject.registerClass(

addButtons(buttons) {
this._controls.destroy_all_children()
buttons.forEach(this._addButton.bind(this))
buttons && buttons.forEach(this._addButton.bind(this))
}

setVisible(visible) {
Expand Down

0 comments on commit eb8bdd3

Please sign in to comment.