Skip to content

Commit

Permalink
build: fix internal Google closure issue with TS3.6 (angular#33257)
Browse files Browse the repository at this point in the history
This patch fixes an internal Google issue that came up with the TS3.6
patch that landed earlier (go/b/142967802).

PR Close angular#33257
  • Loading branch information
matsko authored and AndrusGerman committed Oct 22, 2019
1 parent f593818 commit 128f02d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/render3/view_engine_compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 128f02d

Please sign in to comment.