s/var/let/
This commit is contained in:
parent
4db845a4b1
commit
8972130252
20 changed files with 481 additions and 479 deletions
|
@ -34,21 +34,21 @@ export default class Composer extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
var text = this.state.text;
|
||||
var i;
|
||||
let text = this.state.text;
|
||||
let i;
|
||||
for (i = text.length - 1; i >= 0; i--) {
|
||||
if (text[i] === " ") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
var prefix = text.slice(i + 1);
|
||||
let prefix = text.slice(i + 1);
|
||||
if (!prefix) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
var repl = this.props.autocomplete(prefix);
|
||||
let repl = this.props.autocomplete(prefix);
|
||||
if (!repl) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue