Преглед на файлове

API docs fixes - Destructing -> destroying.

Maciej Bukowski преди 6 години
родител
ревизия
bc67b1a226

+ 1 - 1
packages/ckeditor5-watchdog/src/contextwatchdog.js

@@ -324,7 +324,7 @@ export default class ContextWatchdog extends Watchdog {
 
 			return this._destroy()
 				.catch( err => {
-					console.error( 'An error happened during destructing.', err );
+					console.error( 'An error happened during destroying the context or items.', err );
 				} )
 				.then( () => this._create() )
 				.then( () => this.fire( 'restart' ) );

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

@@ -142,7 +142,7 @@ export default class EditorWatchdog extends Watchdog {
 				return this._destroy();
 			} )
 			.catch( err => {
-				console.error( 'An error happened during the editor destructing.', err );
+				console.error( 'An error happened during the editor destroying.', err );
 			} )
 			.then( () => {
 				if ( typeof this._elementOrData === 'string' ) {

+ 1 - 1
packages/ckeditor5-watchdog/src/watchdog.js

@@ -159,7 +159,7 @@ export default class Watchdog {
 	 * Sets the function that is responsible for the instance destruction.
 	 *
 	 * @param {Function} destructor A callback that takes the instance and returns the promise
-	 * to the destructing process.
+	 * to the destroying process.
 	 */
 	setDestructor( destructor ) {
 		this._destructor = destructor;

+ 2 - 2
packages/ckeditor5-watchdog/tests/contextwatchdog.js

@@ -105,7 +105,7 @@ describe( 'ContextWatchdog', () => {
 			sinon.assert.calledOnce( customDestructor );
 		} );
 
-		it( 'should log if an error happens during the component destructing', async () => {
+		it( 'should log if an error happens during the component destroying', async () => {
 			const mainWatchdog = new ContextWatchdog( Context );
 
 			const consoleErrorStub = sinon.stub( console, 'error' );
@@ -122,7 +122,7 @@ describe( 'ContextWatchdog', () => {
 
 			sinon.assert.calledWith(
 				consoleErrorStub,
-				'An error happened during destructing.',
+				'An error happened during destroying the context or items.',
 				err
 			);
 

+ 1 - 1
packages/ckeditor5-watchdog/tests/editorwatchdog.js

@@ -639,7 +639,7 @@ describe( 'EditorWatchdog', () => {
 
 					sinon.assert.calledWith(
 						console.error,
-						'An error happened during the editor destructing.'
+						'An error happened during the editor destroying.'
 					);
 
 					await watchdog.destroy();