A full featured MPRIS indicator button extension for GNOME Shell 3.38+
GNU General Public License v3.0
159
stars
21
forks
source link
Gtk.IconTheme.get_default() can be NULL. Make chained has_icon call (in _getIcon) more robust. #61
Closed
Mershl closed 3 years ago
Fixing #60.
Gtk.IconTheme.get_default()
can return NULL and will break the extension. Add a check before the chained call to.has_icon()
.I'm open to suggestions if there's better JS syntax available for this case.
Shorter syntax would be Optional Chaning in JS, but it's marked "experimental". Not sure about the mozjs compatibility of older GNOME versions. -> https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Operators/Optional_chaining