Fix bug that would error when fetching workspace hyprland rules on single monitors.

This commit is contained in:
Jas Singh
2024-07-18 00:30:15 -07:00
parent 1e3a23439d
commit 8015294183

View File

@@ -9,6 +9,10 @@ function range(length, start = 1) {
const Workspaces = (monitor = -1, ws = 8) => { const Workspaces = (monitor = -1, ws = 8) => {
const getWorkspacesForMonitor = (curWs, wsRules) => { const getWorkspacesForMonitor = (curWs, wsRules) => {
if (!wsRules || !wsRules.length) {
return true;
}
const monitorMap = {}; const monitorMap = {};
hyprland.monitors.forEach((m) => (monitorMap[m.id] = m.name)); hyprland.monitors.forEach((m) => (monitorMap[m.id] = m.name));