Skip to content

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

fix: would not update on `target` change

Elijah Potterd6995e1771e9
diff --git a/src/harper/Highlighter.tsx b/src/harper/Highlighter.tsx
index 6a5c7f656..18c49ba46 100644
--- a/src/harper/Highlighter.tsx
+++ b/src/harper/Highlighter.tsx
@@ -101,7 +101,7 @@ export default function Highlighter( {
let updateLints = useCallback( () => {
let text = target.textContent;
text && linter.lint( text ).then( setLints );
- }, [] );
+ }, [target] );
useEffect( () => {
updateLints();