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
Logging changeset.get('address.country') after castshould beUnited States`.
changeset.set('name', 'Jim Bob');
changeset.set('address.country', 'United States');
changeset.set('unwantedProp', 'foo');
changeset.set('address.unwantedProp', 123);
changeset.get('name // Jim Bob
changeset.get('address.country // United States
changeset.get('unwantedProp')); // foo
changeset.get('address.unwantedProp // 123
>>>> changeset.cast([name,address.country])
changeset.get('name // Jim Bob
changeset.get('address.country // United States
changeset.get('unwantedProp')); // undefined
changeset.get('another.unwantedProp // undefined
Actual Behavior
Logging changeset.get('address.country') after castis not undefined, where it should beUnited States. Note that before castit logs asUnited States. Note also that the same issue does not occur for name`.
changeset.set('name', 'Jim Bob');
changeset.set('address.country', 'United States');
changeset.set('unwantedProp', 'foo');
changeset.set('address.unwantedProp', 123);
changeset.get('name // Jim Bob
changeset.get('address.country // United States
changeset.get('unwantedProp')); // foo
changeset.get('address.unwantedProp // 123
>>>> changeset.cast([name,address.country])
changeset.get('name // Jim Bob
changeset.get('address.country // undefined
changeset.get('unwantedProp')); // undefined
changeset.get('another.unwantedProp // undefined
The text was updated successfully, but these errors were encountered:
Version
ember-changeset 4.1.1
ember-source 3.28
Test Case
Reduced test case here
Steps to reproduce
If running the app in the reduced test case above, simply click the button "Test" on the landing page of the above app and look at the console output.
Doing so runs this action, closely based on the docs for
cast
, so you could also just copy and paste this code into a component.Expected Behavior
Logging
changeset.get('address.country') after
castshould be
United States`.Actual Behavior
Logging
changeset.get('address.country') after
castis not undefined, where it should be
United States. Note that before
castit logs as
United States. Note also that the same issue does not occur for
name`.The text was updated successfully, but these errors were encountered: