fix(ags bar): stop workspace undefined error

This commit is contained in:
matt1432 2023-10-30 21:58:53 -04:00
parent b187a22e38
commit 8dd83e99ca

View file

@ -10,8 +10,9 @@ const wStyle = 'background: rgba(0, 0, 0, 0.5);';
Hyprland.connect('changed', () => {
Revealed.value = Hyprland.getWorkspace(Hyprland.active.workspace.id)
.hasfullscreen;
const workspace = Hyprland.getWorkspace(Hyprland.active.workspace.id);
if (workspace)
Revealed.value = workspace.hasfullscreen;
});
Hyprland.connect('fullscreen', (_, fullscreen) => Revealed.value = fullscreen);