Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Fixed order of firing _change event and resetting differ.
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2ciek committed Feb 1, 2019
1 parent c45f791 commit 40b7345
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,11 @@ export default class Model {
// Collect an information whether the model document has changed during from the last pending change callback.
hasModelDocumentChanged = hasModelDocumentChanged || this.document._hasDocumentChangedFromTheLastChangeBlock();

this.document._runPostFixersAndResetDiffer( this._currentWriter );

// Fire '_change' event before resetting differ.
this.fire( '_change', this._currentWriter );

this.document._runPostFixersAndResetDiffer( this._currentWriter );

this._pendingChanges.shift();
this._currentWriter = null;
}
Expand Down

0 comments on commit 40b7345

Please sign in to comment.