Skip to content

Commit

Permalink
fix(ngUpgrade): prevent digest already in progress (angular#9046)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelgevold authored and mhevery committed Jun 6, 2016
1 parent 57c9a07 commit d1c989b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/@angular/upgrade/src/angular_js.ts
Expand Up @@ -26,6 +26,7 @@ export interface IRootScopeService {
$apply(): any;
$apply(exp: string): any;
$apply(exp: Function): any;
$applyAsync(): any;
$$childTail: IScope;
$$childHead: IScope;
$$nextSibling: IScope;
Expand Down
2 changes: 1 addition & 1 deletion modules/@angular/upgrade/src/upgrade_adapter.ts
Expand Up @@ -366,7 +366,7 @@ export class UpgradeAdapter {
(injector: angular.IInjectorService, rootScope: angular.IRootScopeService) => {
ng1Injector = injector;
ngZone.onMicrotaskEmpty.subscribe(
{next: (_) => ngZone.runOutsideAngular(() => rootScope.$apply())});
{next: (_) => ngZone.runOutsideAngular(() => rootScope.$applyAsync())});
UpgradeNg1ComponentAdapterBuilder.resolve(this.downgradedComponents, injector)
.then(resolve, reject);
}
Expand Down

0 comments on commit d1c989b

Please sign in to comment.