You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a model with a fragment from ember-data-model-fragments
And I use ember-model-validator
Before saving I run validate to validate fields.
When I have an error in a field (ex, name) , it throws this uncaught error on the adapter instead of adding the field error (ex "Name is empty") to the model with the fragment even though the error that the validation caught was not the fragment property.
Error: Attempted to handle eventbecameError on <fragments/my-fragment:null> while in state root.loaded.saved.
const fragment =
key in this._inFlightFragments
? this._inFlightFragments[key]
: this._fragmentData[key];
if (fragment == null) {
continue;
}
behavior.commitWasRejected(fragment)
to
const fragment = this._inFlightFragments[key]
if (fragment == null) {
continue;
}
behavior.commitWasRejected(fragment)
to remove the tenary operator to strictly use this._inFlightFragments[key] seems to solve the issue but I am not sure if this is safe to do. All I was doing was to revert to this 5.0 version
Hello, I have a model with a fragment from
ember-data-model-fragments
And I use
ember-model-validator
Before saving I run
validate
to validate fields.When I have an error in a field (ex, name) , it throws this uncaught error on the adapter instead of adding the field error (ex "Name is empty") to the model with the fragment even though the error that the validation caught was not the fragment property.
Error: Attempted to handle event
becameErroron <fragments/my-fragment:null> while in state root.loaded.saved.
the stack trace is this
commitWasRejected
commitWasRejected
_fragmentCommitWasRejected
In the first commitWasRejected, updating it from
to
to remove the tenary operator to strictly use
this._inFlightFragments[key]
seems to solve the issue but I am not sure if this is safe to do. All I was doing was to revert to this 5.0 versionversions
The text was updated successfully, but these errors were encountered: