From 2d1c0d71f6be8036b8aa59003c717010b9fa980b Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 7 Dec 2023 23:39:30 -0500 Subject: [PATCH] fix(ags): prevent app undefined error --- devices/wim/config/ags/js/bar/buttons/current-window.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devices/wim/config/ags/js/bar/buttons/current-window.js b/devices/wim/config/ags/js/bar/buttons/current-window.js index adff88d..2ae4b7c 100644 --- a/devices/wim/config/ags/js/bar/buttons/current-window.js +++ b/devices/wim/config/ags/js/bar/buttons/current-window.js @@ -16,8 +16,10 @@ export default () => Box({ connections: [[Hyprland.active.client, (self) => { const app = Applications.query(Hyprland.active.client.class)[0]; - self.icon = app.iconName; - self.visible = Hyprland.active.client.title !== ''; + if (app) { + self.icon = app.iconName; + self.visible = Hyprland.active.client.title !== ''; + } }]], }),