Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Made the destroyed state before destructing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2ciek committed Aug 2, 2019
1 parent dca79c8 commit 08d6125
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/watchdog.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@ export default class Watchdog {

/**
* Destroys the current editor instance by using the destructor passed to the {@link #setDestructor `setDestructor()`} method
* and set state to `destroyed`.
* and sets state to `destroyed`.
*
* @returns {Promise}
*/
destroy() {
return this._destroy().then( () => {
this.state = 'destroyed';
} );
this.state = 'destroyed';

return this._destroy();
}

/**
Expand Down

0 comments on commit 08d6125

Please sign in to comment.