From 571721ff39e14c95aa3b66985fdf7e86a7282b63 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:22:01 +1000 Subject: config: fix errors Check before assigning cause of compat colours --- config/Appearance.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()}`; } } } -- cgit v1.2.3-freya