adopted-ember-addons / adopted-ember-addons/ember-changeset
Stacklevel too deep during deepMerge (when calling changeset.unexecute())
- Vorherrschende Sprache
- JavaScript
- Sterne
- 425
- Forks
- 136
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## Version
ember-changeset@4.1.0
## Test Case
I've created a test here: #653
## Steps to reproduce
- Create a changeset from an ember-data model with sync belongsTo
- Change this belongsTo
- call changeset.execute()
- call changeset.unexecute() => exception
## Expected Behavior
I was expecting the changeset to have the previous belongsTo model associated.
## Actual Behavior
It seems like ember-changeset should work well with Ember-Data, but I think I do somehting wrong, because it crashes during `unexecute`, when it encounters a belongsTo relation.
```
Error: Unable to 'mergeDeep' with your data. Are you trying to merge two ember-data objects? Please file an issue with ember-changeset.
at Proxy.mergeDeep (merge-deep.js:161:1)
at Proxy.unexecute (validated-changeset.es5.js:409:155)
```
but I don't do any merge by myself
Beitragsleitfaden
Rechercherichtung
Start with the test case referenced in issue #653, then inspect merge-deep.js at the failing mergeDeep call and validated-changeset.es5.js around unexecute. Reproduce the belongsTo scenario and verify that unexecute restores the previous associated model without the stack overflow or mergeDeep error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100