This repository was archived by the owner on Jun 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export default class Command {
6666 this . decorate ( 'execute' ) ;
6767
6868 // By default every command is refreshed when changes are applied to the model.
69- this . listenTo ( this . editor . model . document , 'changesDone ' , ( ) => {
69+ this . listenTo ( this . editor . model . document , 'change ' , ( ) => {
7070 this . refresh ( ) ;
7171 } ) ;
7272
@@ -99,7 +99,7 @@ export default class Command {
9999 * in this method.
100100 *
101101 * This method is automatically called when
102- * {@link module:engine/model/document~Document#event:changesDone any changes are applied to the model }.
102+ * {@link module:engine/model/document~Document#event:change any changes are applied to the document }.
103103 */
104104 refresh ( ) {
105105 this . isEnabled = true ;
Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ describe( 'Command', () => {
3434 expect ( command . isEnabled ) . to . be . false ;
3535 } ) ;
3636
37- it ( 'adds a listener which refreshed the command on editor.model.document#changesDone ' , ( ) => {
37+ it ( 'adds a listener which refreshes the command on editor.model.Document#event:change ' , ( ) => {
3838 sinon . spy ( command , 'refresh' ) ;
3939
40- editor . model . document . fire ( 'changesDone ' ) ;
40+ editor . model . document . fire ( 'change ' ) ;
4141
4242 expect ( command . refresh . calledOnce ) . to . be . true ;
4343 } ) ;
You can’t perform that action at this time.
0 commit comments