Closed dwickern closed 8 months ago
There seems to be a problem still with polymorphic values in fragmentArrays when using createRecord
:
const zoo = store.createRecord('zoo', {
star: { $type: 'lion' },
animals: [{ $type: 'lion' }, { $type: 'elephant' }],
});
zoo.star instanceof Lion; // true ✅
zoo.animals.firstObject instanceof Lion; // false ❌
zoo.animals.lastObject instanceof Elephant; // false ❌
Edit: resolved by 15fac61a31126f94094e5872c4f71a78e451b488
@dwickern ready for review?
@knownasilya ready for review 👍
@knownasilya any plans to release this fix?
@dwickern released
I fixed the merge conflicts from #436 and got it working with the new RecordData implementation.
Fixes #316 Closes #436