fix(compiler): serialize any StaticSymbol
correctly, not matter in which context.
This commit is contained in:

committed by
Alex Rickabaugh

parent
c3065aac7a
commit
5614c4ff0f
@ -43,7 +43,7 @@ export class AotSummaryResolver implements SummaryResolver {
|
||||
|
||||
serializeSummaries(srcFileUrl: string, summaries: CompileTypeSummary[]): GeneratedFile {
|
||||
const jsonReplacer = (key: string, value: any) => {
|
||||
if (key === 'reference' && value instanceof StaticSymbol) {
|
||||
if (value instanceof StaticSymbol) {
|
||||
// We convert the source filenames into output filenames,
|
||||
// as the generated summary file will be used when the current
|
||||
// compilation unit is used as a library
|
||||
@ -84,7 +84,7 @@ export class AotSummaryResolver implements SummaryResolver {
|
||||
if (!summary) {
|
||||
try {
|
||||
const jsonReviver = (key: string, value: any) => {
|
||||
if (key === 'reference' && value && value['__symbolic__'] === 'symbol') {
|
||||
if (value && value['__symbolic__'] === 'symbol') {
|
||||
// Note: We can't use staticReflector.findDeclaration here:
|
||||
// Summary files can contain symbols of transitive compilation units
|
||||
// (via the providers), and findDeclaration needs .metadata.json / .d.ts files,
|
||||
|
Reference in New Issue
Block a user