build: fix internal Google closure issue with TS3.6 (#33257)
This patch fixes an internal Google issue that came up with the TS3.6 patch that landed earlier (go/b/142967802). PR Close #33257
This commit is contained in:
parent
8d44b5edac
commit
29bc3a775f
|
@ -225,7 +225,13 @@ export function createContainerRef(
|
|||
ngModuleRef?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<C> {
|
||||
const contextInjector = injector || this.parentInjector;
|
||||
if (!ngModuleRef && (componentFactory as any).ngModule == null && contextInjector) {
|
||||
ngModuleRef = contextInjector.get(viewEngine_NgModuleRef, null) || undefined;
|
||||
// DO NOT REFACTOR. The code here used to have a `value || undefined` expression
|
||||
// which seems to cause internal google apps to fail. This is documented in the
|
||||
// following internal bug issue: go/b/142967802
|
||||
const result = contextInjector.get(viewEngine_NgModuleRef, null);
|
||||
if (result) {
|
||||
ngModuleRef = result;
|
||||
}
|
||||
}
|
||||
|
||||
const componentRef =
|
||||
|
|
Loading…
Reference in New Issue