fix(closure): replace property accesses (#11078)
Accessing a property on the window object must be done with square brackets. Otherwise closure compiler may collide the symbol's alias between the property and variable mappings. Also, accessing the 'provide' property must be done with dot syntax, so that it can be renamed along with the code that declares such a property.
This commit is contained in:
parent
2b313e4979
commit
dc6f72e963
|
@ -185,7 +185,7 @@ function _normalizeProviders(providers: Provider[], res: Provider[]): Provider[]
|
|||
if (b instanceof Type) {
|
||||
res.push({provide: b, useClass: b});
|
||||
|
||||
} else if (b && typeof b == 'object' && b.hasOwnProperty('provide')) {
|
||||
} else if (b && typeof b == 'object' && (b as any).provide !== undefined) {
|
||||
res.push(b as NormalizedProvider);
|
||||
|
||||
} else if (b instanceof Array) {
|
||||
|
|
|
@ -68,10 +68,10 @@ export class BrowserGetTestability implements GetTestability {
|
|||
});
|
||||
};
|
||||
|
||||
if (!global.frameworkStabilizers) {
|
||||
global.frameworkStabilizers = ListWrapper.createGrowableSize(0);
|
||||
if (!global['frameworkStabilizers']) {
|
||||
global['frameworkStabilizers'] = ListWrapper.createGrowableSize(0);
|
||||
}
|
||||
global.frameworkStabilizers.push(whenAllStable);
|
||||
global['frameworkStabilizers'].push(whenAllStable);
|
||||
}
|
||||
|
||||
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):
|
||||
|
|
Loading…
Reference in New Issue