fix(ivy): allow view and content queries to match the same element (#24507)
When creating content queries from a directive on an element we need to take into account existing view queries. The same element can be reported to both content and view queries so freshly created content queries must be combined with pre-existing view queries. PR Close #24507
This commit is contained in:

committed by
Miško Hevery

parent
7c8159b3e2
commit
6d246d6c72
@ -124,7 +124,7 @@ let currentQueries: LQueries|null;
|
||||
|
||||
export function getCurrentQueries(QueryType: {new (): LQueries}): LQueries {
|
||||
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
||||
return currentQueries || (currentQueries = new QueryType());
|
||||
return currentQueries || (currentQueries = (previousOrParentNode.queries || new QueryType()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user