adopted-ember-addons / adopted-ember-addons/ember-changeset

Changeset changes array is not cleared when no changes exist

Aberta
#585 1 comentário 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
425
Forks
136
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## Version

3.13.2

## Test Case

[https://github.com/jeroen-hoekstra/ember-changeset-issue](https://github.com/jeroen-hoekstra/ember-changeset-issue)

## Steps to reproduce

After updating ember-changeset from **3.12.0** to **3.13.2** we noticed a difference in change tracking. Not sure if this is intended behaviour. You can run my test case with both versions and check the logs.

Open de console and notice that on page load the changeset changes array is empty. Initialy the `hidden` property is `false`. Toggle the first toggle so the `hidden` property becomes `true`. We see that the changeset changes array now contains the change object. When toggling it again the changeset changes array should become empty again, as the `hidden` property becomes equal to it's initial value, which is false. This was the case with version **3.12.0** but with **3.13.2** the changeset changes array still contains the change object, but with it's `value` set to `false`.

## Expected Behavior

**Version 3.12**

![Screenshot from 2021-03-22 09-47-11](https://user-images.githubusercontent.com/42991987/111970469-9a97dc00-8afb-11eb-987e-69b253735626.png)

## Actual Behavior

**Version 3.13.2**

![Screenshot from 2021-03-22 09-49-36](https://user-images.githubusercontent.com/42991987/111970527-a84d6180-8afb-11eb-97d9-53e73f168fe2.png)

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start with the linked ember-changeset issue reproduction and run it against versions 3.12.0 and 3.13.2, observing the changes array while toggling hidden from false to true and back. Trace the change-tracking entry point responsible for removing reverted changes; done means the array is empty again when the property returns to its initial value.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
javascript
Domínio
frontend
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.