File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/core/src/application Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -508,13 +508,15 @@ export class ApplicationRef {
508508 const initStatus = this . _injector . get ( ApplicationInitStatus ) ;
509509
510510 if ( ! initStatus . done ) {
511- const standalone = ! isComponentFactory && isStandalone ( componentOrFactory ) ;
512- const errorMessage =
513- ( typeof ngDevMode === 'undefined' || ngDevMode ) &&
514- 'Cannot bootstrap as there are still asynchronous initializers running.' +
511+ let errorMessage = '' ;
512+ if ( typeof ngDevMode === 'undefined' || ngDevMode ) {
513+ const standalone = ! isComponentFactory && isStandalone ( componentOrFactory ) ;
514+ errorMessage =
515+ 'Cannot bootstrap as there are still asynchronous initializers running.' +
515516 ( standalone
516517 ? ''
517518 : ' Bootstrap components in the `ngDoBootstrap` method of the root module.' ) ;
519+ }
518520 throw new RuntimeError ( RuntimeErrorCode . ASYNC_INITIALIZERS_STILL_RUNNING , errorMessage ) ;
519521 }
520522
You can’t perform that action at this time.
0 commit comments