diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-15 01:12:09 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-15 01:12:09 +0800 |
| commit | 44359017b153949759228a0ea80d9d4ca744f41a (patch) | |
| tree | fa2bd9863787f7927f0673da165911c49f2e1bbc | |
| parent | 3ecfa34824d0842f21c925150afd1ec2b62630c0 (diff) | |
activewindow: stop .replace errs
| -rw-r--r-- | bar/ActiveWindow.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bar/ActiveWindow.qml b/bar/ActiveWindow.qml index 5727e3a..e892344 100644 --- a/bar/ActiveWindow.qml +++ b/bar/ActiveWindow.qml @@ -7,6 +7,7 @@ import Quickshell.Widgets import qs.components import qs.config +// TODO use a item wrapping loader for opacity Behavior Rectangle { id: root property var toplevel: Hyprland.activeToplevel @@ -29,9 +30,9 @@ Rectangle { function strip(s) { var out = s; Bar.windowStrip.forEach(function (w) { - out = out.replace(new RegExp(w, "g"), ""); + out = out?.replace(new RegExp(w, "g"), ""); }); - return out; + return out?.trim() || s; } RowLayout { |
