Skip to content

Commit

Permalink
Merge pull request #1352 from mupkoo/safe-shutdown
Browse files Browse the repository at this point in the history
Check if there is a server before shutting it down
  • Loading branch information
samselikoff committed Jul 27, 2018
2 parents 628a717 + 8978405 commit 8a0ef54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addon-test-support/setup-mirage.js
Expand Up @@ -22,8 +22,10 @@ export default function setupMirage(hooks = self) {

hooks.afterEach(function() {
return settled().then(() => {
this.server.shutdown();
delete this.server;
if (this.server) {
this.server.shutdown();
delete this.server;
}
});
});
}

0 comments on commit 8a0ef54

Please sign in to comment.