fix(compiler): correctly handle when toString is exported (#15430)

Fixes #15420
This commit is contained in:
Chuck Jazdzewski
2017-03-23 13:38:01 -07:00
committed by Victor Berchet
parent c8ab5cb0c5
commit 0dda01e37c
2 changed files with 8 additions and 1 deletions

View File

@ -224,7 +224,7 @@ export class StaticSymbolResolver {
this.recordImportAs(symbol, importSymbol);
}
const origin = origins[metadataKey];
const origin = origins.hasOwnProperty(metadataKey) && origins[metadataKey];
if (origin) {
// If the symbol is from a bundled index, use the declaration location of the
// symbol so relative references (such as './my.html') will be calculated