diff options
Diffstat (limited to 'modern/src/settings/components')
-rw-r--r-- | modern/src/settings/components/EditItemView.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/settings/components/EditItemView.js b/modern/src/settings/components/EditItemView.js index 2283ebda..9b9918fe 100644 --- a/modern/src/settings/components/EditItemView.js +++ b/modern/src/settings/components/EditItemView.js @@ -23,7 +23,7 @@ const useStyles = makeStyles((theme) => ({ })); const EditItemView = ({ - children, endpoint, item, setItem, validate, onItemSaved, menu, breadcrumbs, + children, endpoint, item, setItem, defaultItem, validate, onItemSaved, menu, breadcrumbs, }) => { const history = useHistory(); const classes = useStyles(); @@ -38,7 +38,7 @@ const EditItemView = ({ setItem(await response.json()); } } else { - setItem({}); + setItem(defaultItem || {}); } }, [id]); |