|
@@ -143,15 +143,15 @@ export default class EditorWatchdog extends Watchdog {
|
|
|
console.error( 'An error happened during the editor destructing.', err );
|
|
console.error( 'An error happened during the editor destructing.', err );
|
|
|
} )
|
|
} )
|
|
|
.then( () => {
|
|
.then( () => {
|
|
|
- if ( typeof this._elementOrData === 'string' ) {
|
|
|
|
|
- return this.create( this._data, this._config );
|
|
|
|
|
- } else {
|
|
|
|
|
- const updatedConfig = Object.assign( {}, this._config, {
|
|
|
|
|
|
|
+ let config = this._config;
|
|
|
|
|
+
|
|
|
|
|
+ if ( isElement( this._elementOrData ) ) {
|
|
|
|
|
+ config = Object.assign( {}, this._config, {
|
|
|
initialData: this._data
|
|
initialData: this._data
|
|
|
} );
|
|
} );
|
|
|
-
|
|
|
|
|
- return this.create( this._elementOrData, updatedConfig );
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ return this.create( this._elementOrData, config );
|
|
|
} )
|
|
} )
|
|
|
.then( () => {
|
|
.then( () => {
|
|
|
this.fire( 'restart' );
|
|
this.fire( 'restart' );
|