aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/components
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-15 14:58:38 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-15 14:58:38 -0700
commit06dd04d074a79a082a51d37bb84a19d49b29fc05 (patch)
tree09acff88dbbb0a468db17c4f2508790825a1b709 /modern/src/settings/components
parent6af8b218a1d9be4d8dcf6a8398b08c874d8a12dc (diff)
downloadtrackermap-web-06dd04d074a79a082a51d37bb84a19d49b29fc05.tar.gz
trackermap-web-06dd04d074a79a082a51d37bb84a19d49b29fc05.tar.bz2
trackermap-web-06dd04d074a79a082a51d37bb84a19d49b29fc05.zip
Add missing user details
Diffstat (limited to 'modern/src/settings/components')
-rw-r--r--modern/src/settings/components/EditItemView.js4
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]);