Skip to content

Commit

Permalink
Made Core#destroy async
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Apr 11, 2020
1 parent d58d1d7 commit 2396c6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"osjs"
],
"dependencies": {
"@osjs/common": "^3.0.7",
"@osjs/common": "^3.0.8",
"@osjs/event-emitter": "^1.0.8",
"css-mediaquery": "^0.1.2",
"dateformat": "^3.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default class Core extends CoreBase {
*/
destroy() {
if (this.destroyed) {
return;
return Promise.resolve();
}

this.emit('osjs/core:destroy');
Expand All @@ -108,7 +108,7 @@ export default class Core extends CoreBase {
this.connectfailed = false;
this.ping = null;

super.destroy();
return super.destroy();
}

/**
Expand Down

0 comments on commit 2396c6f

Please sign in to comment.