From 4ef49e695e833d7bca99078479f22e9a11493f1f Mon Sep 17 00:00:00 2001 From: jods Date: Sat, 4 Feb 2017 00:14:50 +0100 Subject: [PATCH] fix(startup): start() incorrectly returns a resolved promise --- src/aurelia.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/aurelia.js b/src/aurelia.js index f2e7d292..4d040d06 100644 --- a/src/aurelia.js +++ b/src/aurelia.js @@ -69,14 +69,12 @@ export class Aurelia { * @return Returns a Promise with the started Aurelia instance. */ start(): Promise { - 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)) {