Skip to content

Commit 514ebf4

Browse files
pkozlowski-opensourcejasonaden
authored andcommitted
refactor(ivy): avoid calling other instructions from the loadViewQuery instruction (angular#30587)
PR Close angular#30587
1 parent 7c0667d commit 514ebf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/src/render3/query.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ import {assertDataInRange, assertDefined, assertEqual} from '../util/assert';
1818
import {assertPreviousIsParent} from './assert';
1919
import {getNodeInjectable, locateDirectiveOrProvider} from './di';
2020
import {NG_ELEMENT_ID} from './fields';
21-
import {store, ɵɵload} from './instructions/all';
21+
import {store} from './instructions/all';
2222
import {storeCleanupWithContext} from './instructions/shared';
2323
import {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';
2424
import {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';
2525
import {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, unusedValueExportToPlacateAjd as unused3} from './interfaces/node';
2626
import {LQueries, unusedValueExportToPlacateAjd as unused4} from './interfaces/query';
2727
import {CONTENT_QUERIES, HEADER_OFFSET, LView, QUERIES, TVIEW} from './interfaces/view';
2828
import {getCurrentQueryIndex, getIsParent, getLView, isCreationMode, setCurrentQueryIndex} from './state';
29+
import {loadInternal} from './util/view_utils';
2930
import {createElementRef, createTemplateRef} from './view_engine_compatibility';
3031

3132
const unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4;
@@ -456,7 +457,7 @@ export function ɵɵviewQuery<T>(
456457
export function ɵɵloadViewQuery<T>(): T {
457458
const index = getCurrentQueryIndex();
458459
setCurrentQueryIndex(index + 1);
459-
return ɵɵload<T>(index - HEADER_OFFSET);
460+
return loadInternal<T>(getLView(), index - HEADER_OFFSET);
460461
}
461462

462463
/**

0 commit comments

Comments
 (0)