From 8015294183859390cce247d0885ef61dec134e44 Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Thu, 18 Jul 2024 00:30:15 -0700 Subject: [PATCH] Fix bug that would error when fetching workspace hyprland rules on single monitors. --- modules/bar/workspaces/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/bar/workspaces/index.js b/modules/bar/workspaces/index.js index 22432e0..4c48663 100644 --- a/modules/bar/workspaces/index.js +++ b/modules/bar/workspaces/index.js @@ -9,6 +9,10 @@ function range(length, start = 1) { const Workspaces = (monitor = -1, ws = 8) => { const getWorkspacesForMonitor = (curWs, wsRules) => { + if (!wsRules || !wsRules.length) { + return true; + } + const monitorMap = {}; hyprland.monitors.forEach((m) => (monitorMap[m.id] = m.name));