Bladeren bron

Removed variable assignment in Document.enqueueChanges.

Szymon Cofalik 10 jaren geleden
bovenliggende
commit
193c98742f
1 gewijzigde bestanden met toevoegingen van 5 en 7 verwijderingen
  1. 5 7
      packages/ckeditor5-engine/src/treemodel/document.js

+ 5 - 7
packages/ckeditor5-engine/src/treemodel/document.js

@@ -152,14 +152,12 @@ CKEDITOR.define( [
 		 * @param {Function} callback Callback to enqueue.
 		 */
 		enqueueChanges( callback ) {
-			let pendingChanges = this._pendingChanges;
+			this._pendingChanges.push( callback );
 
-			pendingChanges.push( callback );
-
-			if ( pendingChanges.length == 1 ) {
-				while ( pendingChanges.length ) {
-					pendingChanges[ 0 ]();
-					pendingChanges.shift();
+			if ( this._pendingChanges.length == 1 ) {
+				while ( this._pendingChanges.length ) {
+					this._pendingChanges[ 0 ]();
+					this._pendingChanges.shift();
 				}
 
 				this.fire( 'changesDone' );