From 60c832ed0a5cb67523a9a664a309cd0ad6ab1e5a Mon Sep 17 00:00:00 2001 From: Abhishek Katiyar Date: Thu, 16 Jul 2020 16:24:21 +0530 Subject: [PATCH] [infra-429] | Abhishek | Fix minor issues --- src/components/manifest/Form.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/manifest/Form.tsx b/src/components/manifest/Form.tsx index 189a37c..0d96dae 100644 --- a/src/components/manifest/Form.tsx +++ b/src/components/manifest/Form.tsx @@ -84,9 +84,9 @@ const Form = (props: any) => { }; useEffect(() => { - const copyId = props.location.search.split("=")[1]; + const queryParams = new URLSearchParams(props.location.search); if(isCopy) { - getCopy(copyId).then(res => { + getCopy(Number(queryParams.get("copyId"))).then(res => { setFormInitData(res); }); } @@ -123,7 +123,7 @@ const Form = (props: any) => { return (