Skip to content

Commit

Permalink
fix createRecord for polymorphic fragment arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
dwickern committed Feb 5, 2024
1 parent 576f118 commit 15fac61
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions addon/array/fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ const FragmentArray = StatefulArray.extend({
existing.setProperties(data);
return recordDataFor(existing);
}
const fragment = this.store.createFragment(this.modelName, data);
setFragmentOwner(fragment, this.recordData, this.key);
return recordDataFor(fragment);
return this.recordData._newFragmentRecordDataForKey(this.key, data);
},

/**
Expand Down

0 comments on commit 15fac61

Please sign in to comment.