fix(di): do not rely on the fact that types are canonicalized

This commit is contained in:
vsavkin 2015-07-16 10:37:58 -07:00
parent c701664e07
commit 2147ce45c2
1 changed files with 3 additions and 1 deletions

View File

@ -674,7 +674,7 @@ export class Injector {
private _getByKey(key: Key, depVisibility: VisibilityMetadata, optional: boolean,
bindingVisibility: number): any {
if (key.token === Injector) {
if (key === INJECTOR_KEY) {
return this;
}
@ -723,6 +723,8 @@ export class Injector {
}
}
var INJECTOR_KEY = Key.get(Injector);
function _resolveBindings(bindings: List<Type | Binding | List<any>>): List<ResolvedBinding> {
var resolvedList = ListWrapper.createFixedSize(bindings.length);