mirror of
https://github.com/outline/outline.git
synced 2026-11-28 16:19:46 +03:00
fix: matchesNode error in destroyed editor transaction
This commit is contained in:
1 parent
df9f8cbabc
commit
193bde0bd5
1 file changed
+7
-4
@@ -457,11 +457,14 @@ export class Editor extends React.PureComponent<
|
||||
state: this.createState(this.props.value),
|
||||
editable: () => !this.props.readOnly,
|
||||
nodeViews: this.nodeViews,
|
||||
dispatchTransaction(transaction) {
|
||||
dispatchTransaction(this: EditorView, transaction) {
|
||||
if (this.isDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
// callback is bound to have the view instance as its this binding
|
||||
const { state, transactions } = (
|
||||
this.state as EditorState
|
||||
).applyTransaction(transaction);
|
||||
const { state, transactions } =
|
||||
this.state.applyTransaction(transaction);
|
||||
|
||||
this.updateState(state);
|
||||
|
||||
|
||||
Reference in new issue
Block a user