8
0
Эх сурвалжийг харах

Restored the previous way of getting data.

Maciej Bukowski 6 жил өмнө
parent
commit
151c0f113d

+ 6 - 6
packages/ckeditor5-watchdog/src/editorwatchdog.js

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