Skip to content

Commit

Permalink
Merge pull request aurelia#709 from jods4/start-race
Browse files Browse the repository at this point in the history
fix(startup): start() incorrectly returns a resolved promise
  • Loading branch information
EisenbergEffect authored Feb 5, 2017
2 parents fd1c1a2 + 4ef49e6 commit d650b01
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/aurelia.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,12 @@ export class Aurelia {
* @return Returns a Promise with the started Aurelia instance.
*/
start(): Promise<Aurelia> {
if (this.started) {
return Promise.resolve(this);
if (this._started) {
return this._started;
}

this.started = true;
this.logger.info('Aurelia Starting');

return this.use.apply().then(() => {
return this._started = this.use.apply().then(() => {
preventActionlessFormSubmit();

if (!this.container.hasResolver(BindingLanguage)) {
Expand Down

0 comments on commit d650b01

Please sign in to comment.