summaryrefslogtreecommitdiff
path: root/launcher/components/Spell.qml
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-08-18 15:50:57 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-08-19 20:15:22 +0800
commit7419b49dbd9495f40f09d43bb26115a788d455d6 (patch)
tree79c2bd1275610f39fd8600508de20952dac7e277 /launcher/components/Spell.qml
parent19289b6dc43d51f0405ce6b5b0c33b2259423fd6 (diff)
refactor(launcher:components): better handle defaults
Diffstat (limited to 'launcher/components/Spell.qml')
-rw-r--r--launcher/components/Spell.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/launcher/components/Spell.qml b/launcher/components/Spell.qml
index d4f505b..fe01c3f 100644
--- a/launcher/components/Spell.qml
+++ b/launcher/components/Spell.qml
@@ -63,8 +63,8 @@ IComponent {
return {
valid: isValid,
priority: isValid,
- answer: isValid ? answer : "",
- predictiveCompletion: isValid ? answer.slice(input.length) : ""
+ answer: answer || "",
+ predictiveCompletion: answer?.slice(input.length) || ""
};
}