From 3ff60a03740d1e56d5b88f906d30e61695a1317f Mon Sep 17 00:00:00 2001 From: Kamil Piechaczek Date: Mon, 8 Mar 2021 11:34:06 +0100 Subject: [PATCH] Removed invalid change. --- src/ckeditor.jsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/ckeditor.jsx b/src/ckeditor.jsx index 552adbb..73317ce 100644 --- a/src/ckeditor.jsx +++ b/src/ckeditor.jsx @@ -74,7 +74,7 @@ export default class CKEditor extends React.Component { // Destroy the editor before unmouting the component. componentWillUnmount() { - return this._destroyEditor(); + this._destroyEditor(); } // Render a
element which will be replaced by CKEditor. @@ -157,19 +157,15 @@ export default class CKEditor extends React.Component { /** * Destroys the editor by destroying the watchdog. - * - * @returns {Promise} */ _destroyEditor() { // It may happen during the tests that the watchdog instance is not assigned before destroying itself. See: #197. if ( !this.watchdog ) { - return Promise.resolve(); + return; } - return this.watchdog.destroy() - .then( () => { - this.watchdog = null; - } ); + this.watchdog.destroy(); + this.watchdog = null; } /**