Skip to content

Commit

Permalink
style(core): update style for if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
virkt25 committed Feb 20, 2018
1 parent 2a54c18 commit edfe2ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/core/src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ export class Application extends Context {
const bootstrapper = await this.get(CoreBindings.BOOTSTRAPPER, {
optional: true,
});

// Since bootstrapper is optional, we check to see if instance was returned
if (bootstrapper) {
if (!bootstrapper) {
console.warn(`No bootstrapper was bound to ${CoreBindings.BOOTSTRAPPER}`);
} else {
// this.options can never be undefined but TypeScript complains so we add
// a check (and throw an error message just to be safe but it should never
// be thrown).
Expand All @@ -119,8 +122,6 @@ export class Application extends Context {
} else {
throw new Error(`Application.options need to be defined to use boot`);
}
} else {
console.warn(`No bootstrapper was bound to ${CoreBindings.BOOTSTRAPPER}`);
}
}

Expand Down

0 comments on commit edfe2ff

Please sign in to comment.