Skip to content

Commit

Permalink
fixup! fix(core): Switch emitDistinctChangesOnlyDefaultValue to true
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery committed Mar 11, 2021
1 parent da5c248 commit a6ba19b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/compiler/src/render3/partial/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function compileQuery(query: R3QueryMetadata): o.LiteralMapExpr {
meta.set(
'predicate', Array.isArray(query.predicate) ? asLiteral(query.predicate) : query.predicate);
if (!query.emitDistinctChangesOnly) {
// `emitDistinctChangesOnly` is special because in the future we expect it to be `true`.
// Therefore we explicitly emit the field only when it's `false`.
// `emitDistinctChangesOnly` is special because we expect it to be `true`.
// Therefore we explicitly emit the field, and explicitly place it only when it's `false`.
meta.set('emitDistinctChangesOnly', o.literal(false));
} else {
// The linker will assume that an absent `emitDistinctChangesOnly` flag is by default `true`.
Expand Down
5 changes: 1 addition & 4 deletions packages/core/test/acceptance/query_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,8 @@ describe('query logic', () => {
* - systematically detach and insert a view - this would result in unnecessary processing
* when the previous and new indexes for the move operation are the same;
* - detect the situation where the indexes are the same and do no processing in such case.
*
* This tests asserts on the implementation choices done by the VE (detach and insert) so we
* can replicate the same behavior in ivy.
*/
it('should notify on changes when a given view is removed and re-inserted at the same index',
it('should NOT notify on changes when a given view is removed and re-inserted at the same index',
() => {
@Component({
selector: 'test-comp',
Expand Down

0 comments on commit a6ba19b

Please sign in to comment.