mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-16 14:51:56 +01:00
Don't print errors when the tab is used with no autocomplete present
Fixes https://github.com/vector-im/riot-web/issues/12461 Not a release blocker because the error is caught, and is at the end of the function. Just log spam.
This commit is contained in:
parent
1958dae519
commit
30a0d88074
@ -471,11 +471,15 @@ export default class BasicMessageEditor extends React.Component {
|
||||
const addedLen = range.replace([partCreator.pillCandidate(range.text)]);
|
||||
return model.positionForOffset(caret.offset + addedLen, true);
|
||||
});
|
||||
|
||||
// Don't try to do things with the autocomplete if there is none shown
|
||||
if (model.autoComplete) {
|
||||
await model.autoComplete.onTab();
|
||||
if (!model.autoComplete.hasSelection()) {
|
||||
this.setState({showVisualBell: true});
|
||||
model.autoComplete.close();
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user