Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix(web): truthiness check

Elijah Potterc312456e56c4
diff --git a/packages/web/src/lib/Editor.svelte b/packages/web/src/lib/Editor.svelte
index 0517ddaf7..c02a1b128 100644
--- a/packages/web/src/lib/Editor.svelte
+++ b/packages/web/src/lib/Editor.svelte
@@ -111,7 +111,7 @@
class="w-full"
style="height: 40px; margin: 5px 0px;"
on:click={() =>
- focused &&
+ focused != null &&
applySuggestion(content, suggestion, lints[focused].span()).then(
(edited) => (content = edited)
)}