bar: fix null pointer errors

This commit is contained in:
2 * r + 2 * t 2025-01-15 00:35:41 +11:00
parent 67f4526a9a
commit 4ce74c4dc5

View file

@ -51,12 +51,14 @@ const ActiveWindow = () => (
className="icon" className="icon"
setup={self => setup={self =>
hookFocusedClientProp(self, "class", c => { hookFocusedClientProp(self, "class", c => {
self.label = c ? getAppCategoryIcon(c.class) : "desktop_windows"; self.label = c?.class ? getAppCategoryIcon(c.class) : "desktop_windows";
}) })
} }
/> />
<label <label
setup={self => hookFocusedClientProp(self, "title", c => (self.label = c ? ellipsize(c.title) : "Desktop"))} setup={self =>
hookFocusedClientProp(self, "title", c => (self.label = c?.title ? ellipsize(c.title) : "Desktop"))
}
/> />
</box> </box>
); );