From 91999f146353519985502a846e2ae2acacb82915 Mon Sep 17 00:00:00 2001 From: Laurens Kling Date: Tue, 8 Sep 2026 18:58:22 +0200 Subject: [PATCH] conditional locale only add `locale` to the querystring when locale is thruthy --- packages/core/admin/components/EditForm/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/admin/components/EditForm/index.tsx b/packages/core/admin/components/EditForm/index.tsx index 613ec8a4..b1a53e6d 100644 --- a/packages/core/admin/components/EditForm/index.tsx +++ b/packages/core/admin/components/EditForm/index.tsx @@ -28,7 +28,7 @@ const EditForm = () => { const queryClient = useQueryClient(); const urlParams = new URLSearchParams(window.location.search); const locale = urlParams.get('plugins[i18n][locale]'); - const aliases = useQuery(`aliases-${model}-${id}-${locale}`, async () => get(`/webtools/url-alias/findFrom?model=${model}&documentId=${id}&locale=${locale}`)); + const aliases = useQuery(`aliases-${model}-${id}-${locale}`, async () => get(`/webtools/url-alias/findFrom?model=${model}&documentId=${id}${locale ? `&locale=${locale}` : ''}`)); const mutation = useMutation((updatedAlias: Partial) => put(`/webtools/url-alias/update/${aliases.data.data[0].documentId}${locale ? `?locale=${locale}` : ''}`, { data: updatedAlias, }));