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

fix: code cleanup, fix getCurrentCommand

This commit is contained in:
Aviral Dasgupta
2016-07-04 21:44:35 +05:30
parent cccc58b47f
commit 30b7efd585
5 changed files with 16 additions and 15 deletions

View File

@@ -18,6 +18,8 @@ export default class AutocompleteProvider {
return null;
}
this.commandRegex.lastIndex = 0;
let match;
while ((match = this.commandRegex.exec(query)) != null) {
let matchStart = match.index,
@@ -33,7 +35,6 @@ export default class AutocompleteProvider {
};
}
}
this.commandRegex.lastIndex = 0;
return {
command: null,
range: {