diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-30 22:22:01 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-30 22:22:01 +1000 |
| commit | 571721ff39e14c95aa3b66985fdf7e86a7282b63 (patch) | |
| tree | c9af4ffa46b843a04b5f3a3e6340a4b4bdbba054 /config | |
| parent | refactor: move tray items into own file (diff) | |
| download | caelestia-shell-571721ff39e14c95aa3b66985fdf7e86a7282b63.tar.gz caelestia-shell-571721ff39e14c95aa3b66985fdf7e86a7282b63.tar.bz2 caelestia-shell-571721ff39e14c95aa3b66985fdf7e86a7282b63.zip | |
config: fix errors
Check before assigning cause of compat colours
Diffstat (limited to 'config')
| -rw-r--r-- | config/Appearance.qml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/Appearance.qml b/config/Appearance.qml index cf511d1..99b0525 100644 --- a/config/Appearance.qml +++ b/config/Appearance.qml @@ -31,11 +31,14 @@ Singleton { onFileChanged: this.reload() onLoaded: { const contents = this.text(); + const colours = root.colours; for (const line of contents.split("\n")) { let [name, colour] = line.split(" "); name = name.trim(); - root.colours[colourNames.includes(name) ? name : `m3${name}`] = `#${colour.trim()}`; + name = colourNames.includes(name) ? name : `m3${name}`; + if (colours.hasOwnProperty(name)) + colours[name] = `#${colour.trim()}`; } } } |