Skip to content

Commit c2e53bf

Browse files
committed
fix: avoid non-null assertion operator
1 parent 2bc5e79 commit c2e53bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/text-expander-element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class TextExpander {
162162
const cursor = this.input.selectionEnd
163163
const text = this.input.value
164164
for (const key of this.expander.keys) {
165-
const found = query(text, key, cursor!, this.multiWord)
165+
const found = query(text, key, cursor || 0, this.multiWord)
166166
if (found) {
167167
return {text: found.text, key, position: found.position}
168168
}

0 commit comments

Comments
 (0)