fix 404 issue on new

This commit is contained in:
mfrances 2021-02-22 09:52:49 -05:00
parent 733d5f4b6f
commit 489ed64049
2 changed files with 10 additions and 6 deletions

View file

@ -93,9 +93,11 @@ export const UserFederationKerberosSettings = () => {
useEffect(() => { useEffect(() => {
(async () => { (async () => {
const fetchedComponent = await adminClient.components.findOne({ id }); if (id !== "new") {
if (fetchedComponent) { const fetchedComponent = await adminClient.components.findOne({ id });
setupForm(fetchedComponent); if (fetchedComponent) {
setupForm(fetchedComponent);
}
} }
})(); })();
}, []); }, []);

View file

@ -123,9 +123,11 @@ export const UserFederationLdapSettings = () => {
useEffect(() => { useEffect(() => {
(async () => { (async () => {
const fetchedComponent = await adminClient.components.findOne({ id }); if (id !== "new") {
if (fetchedComponent) { const fetchedComponent = await adminClient.components.findOne({ id });
setupForm(fetchedComponent); if (fetchedComponent) {
setupForm(fetchedComponent);
}
} }
})(); })();
}, []); }, []);