Merge pull request #3396 from matrix-org/bwindels/fix-formatbar-merge-error

Fix error on load in composer
This commit is contained in:
Bruno Windels 2019-09-06 10:05:19 +00:00 committed by GitHub
commit 4876f4c469
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,8 +130,8 @@ export default class BasicMessageEditor extends React.Component {
} catch (err) { } catch (err) {
console.error(err); console.error(err);
} }
// if caret is a range, take the end position // if caret selection is a range, take the end position
const position = caret.end || caret; const position = selection.end || selection;
this._setLastCaretFromPosition(position); this._setLastCaretFromPosition(position);
} }
if (this.props.placeholder) { if (this.props.placeholder) {