adopted-ember-addons / adopted-ember-addons/ember-changeset
Changeset changes array is not cleared when no changes exist
- 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**

## Actual Behavior
**Version 3.13.2**

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