@textcomplete/core
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -19,6 +19,7 @@ "use strict"; | ||
execute(beforeCursor, callback) { | ||
var _a; | ||
const match = this.matchWithContext(beforeCursor); | ||
if (!match) | ||
return false; | ||
const term = match[this.props.index || exports.DEFAULT_INDEX]; | ||
const term = match[(_a = this.props.index) !== null && _a !== void 0 ? _a : exports.DEFAULT_INDEX]; | ||
this.search(term, (results) => { | ||
@@ -25,0 +26,0 @@ callback(results.map((result) => new SearchResult_1.SearchResult(result, term, this))); |
{ | ||
"name": "@textcomplete/core", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Textcomplete core.", | ||
@@ -40,3 +40,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "92391696179af51f369898e6f666923ac4c93de0" | ||
"gitHead": "67a13ff0c065121c646ec0bf4ca76182c5a76073" | ||
} |
@@ -44,3 +44,3 @@ import { SearchResult } from "./SearchResult" | ||
if (!match) return false | ||
const term = match[this.props.index || DEFAULT_INDEX] | ||
const term = match[this.props.index ?? DEFAULT_INDEX] | ||
this.search( | ||
@@ -47,0 +47,0 @@ term, |
Sorry, the diff of this file is not supported yet
84065
1851