refactor(upgrade): avoid using static inherited method (#31986)
Using `ParentInjectorPromise.all()` (which is a static method inherited from `SyncPromise`) causes Closure Compiler (or some related tool) to complain: ``` TypeError: ...$packages$upgrade$src$common$src$downgrade_component_ParentInjectorPromise.all is not a function ``` Switching to `SyncPromise.all()` (the static method on the parent class) to avoid this error. PR Close #31986
This commit is contained in:
parent
2e84f4e0cd
commit
a07de82f79
|
@ -196,7 +196,11 @@ export function downgradeComponent(info: {
|
||||||
wrapCallback(() => doDowngrade(pInjector, mInjector))();
|
wrapCallback(() => doDowngrade(pInjector, mInjector))();
|
||||||
};
|
};
|
||||||
|
|
||||||
ParentInjectorPromise.all([finalParentInjector, finalModuleInjector])
|
// NOTE:
|
||||||
|
// Not using `ParentInjectorPromise.all()` (which is inherited from `SyncPromise`), because
|
||||||
|
// Closure Compiler (or some related tool) complains:
|
||||||
|
// `TypeError: ...$src$downgrade_component_ParentInjectorPromise.all is not a function`
|
||||||
|
SyncPromise.all([finalParentInjector, finalModuleInjector])
|
||||||
.then(([pInjector, mInjector]) => downgradeFn(pInjector, mInjector));
|
.then(([pInjector, mInjector]) => downgradeFn(pInjector, mInjector));
|
||||||
|
|
||||||
ranAsync = true;
|
ranAsync = true;
|
||||||
|
|
Loading…
Reference in New Issue