Skip to content

Commit

Permalink
Remove rec.id from freshly-loaded record to be cloned
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeTaylor committed Jul 21, 2023
1 parent b090a3f commit c0232ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/smart-components/lib/EntryManager/ConnectedWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function ConnectedWrapper({ resourcePath, initialValues, underlyingComponent, cl
if (idToLoad) {
okapiKy(`${resourcePath}/${idToLoad}`)
.then(res => res.json().then(rec => {
if (clonedRecordId) delete rec.id;
setRecord(rec);
}));
}
Expand Down

0 comments on commit c0232ec

Please sign in to comment.