statusNotifierWatcher: Properly handle null services
They may be added to the set in case they match service name
Marco Trevisan (TreviƱo) authored 1 year, 2 months ago
Marco Trevisan committed 1 year, 2 months ago
160 | 160 | const ids = services.map(s => Util.indicatorId(s, name, path)); |
161 | 161 | if (ids.every(id => !this._items.has(id))) { |
162 | 162 | const service = services.find(s => |
163 | s.startsWith('org.kde.StatusNotifierItem')) || services[0]; | |
163 | s && s.startsWith('org.kde.StatusNotifierItem')) || services[0]; | |
164 | 164 | const id = Util.indicatorId( |
165 | 165 | path === DEFAULT_ITEM_OBJECT_PATH ? service : null, |
166 | 166 | name, path); |