X Tutup
Skip to content

Commit 2147ce4

Browse files
committed
fix(di): do not rely on the fact that types are canonicalized
1 parent c701664 commit 2147ce4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/angular2/src/di/injector.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ export class Injector {
674674

675675
private _getByKey(key: Key, depVisibility: VisibilityMetadata, optional: boolean,
676676
bindingVisibility: number): any {
677-
if (key.token === Injector) {
677+
if (key === INJECTOR_KEY) {
678678
return this;
679679
}
680680

@@ -723,6 +723,8 @@ export class Injector {
723723
}
724724
}
725725

726+
var INJECTOR_KEY = Key.get(Injector);
727+
726728

727729
function _resolveBindings(bindings: List<Type | Binding | List<any>>): List<ResolvedBinding> {
728730
var resolvedList = ListWrapper.createFixedSize(bindings.length);

0 commit comments

Comments
 (0)
X Tutup