1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Convert imports to ES6 from CommonJS

This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async)
This commit is contained in:
Travis Ralston
2019-12-20 14:41:07 -07:00
parent 042bd35d79
commit f1ac3d2f64
38 changed files with 67 additions and 92 deletions

View File

@@ -37,7 +37,7 @@ export default class DuckDuckGoProvider extends AutocompleteProvider {
+ `&format=json&no_redirect=1&no_html=1&t=${encodeURIComponent(REFERRER)}`;
}
async getCompletions(query: string, selection: SelectionRange, force?: boolean = false) {
async getCompletions(query: string, selection: SelectionRange, force: boolean = false) {
const {command, range} = this.getCurrentCommand(query, selection);
if (!query || !command) {
return [];