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

Changeset changes array is not cleared when no changes exist

Đang mở
#585 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
425
Fork
136
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.