fix(tsc-wrapped): fix metadata symbol reference

This commit is contained in:
Olivier Combe 2017-09-08 18:18:13 +02:00 committed by Matias Niemelä
parent a9ef858359
commit 626555c013
2 changed files with 2 additions and 2 deletions

View File

@ -292,7 +292,7 @@ export class MetadataBundler {
// keep one entry and replace the others by references
names.forEach((name: string, i: number) => {
if (i !== reference) {
result[name] = {__symbolic: 'reference', name: declaredName};
result[name] = {__symbolic: 'reference', name: names[reference]};
}
});
}

View File

@ -219,7 +219,7 @@ describe('metadata bundler', () => {
expect(A2.name).toEqual('A');
expect(B1.__symbolic).toEqual('class');
expect(B2.__symbolic).toEqual('reference');
expect(B2.name).toEqual('B');
expect(B2.name).toEqual('B1');
});
});