Skip to content

Commit

Permalink
Use zero index correctly (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuku authored Feb 11, 2021
1 parent a6ce2fa commit 990ff81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/textcomplete-core/src/Strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Strategy<T> {
): boolean {
const match = this.matchWithContext(beforeCursor)
if (!match) return false
const term = match[this.props.index || DEFAULT_INDEX]
const term = match[this.props.index ?? DEFAULT_INDEX]
this.search(
term,
(results: T[]) => {
Expand Down

0 comments on commit 990ff81

Please sign in to comment.