From ae4c9a582db4533c6953eb00c8c8d8df0d8b5600 Mon Sep 17 00:00:00 2001 From: Peach Date: Tue, 7 Feb 2023 15:11:14 +0800 Subject: [PATCH] refactor: remove useless question mark from mobile demo url (#1462) --- suites/theme-mobile/src/builtins/Previewer/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suites/theme-mobile/src/builtins/Previewer/index.tsx b/suites/theme-mobile/src/builtins/Previewer/index.tsx index 57fad240a5..740d315fa8 100644 --- a/suites/theme-mobile/src/builtins/Previewer/index.tsx +++ b/suites/theme-mobile/src/builtins/Previewer/index.tsx @@ -16,7 +16,7 @@ const MobilePreviewer: FC = (props) => { if (p.compact) params.set('compact', ''); if (p.background) params.set('background', p.background); - return `${pathname}?${params.toString()}`; + return `${pathname}?${params.toString()}`.replace(/\?$/, ''); }, []); const [demoUrl, setDemoUrl] = useState(() => generateUrl(props));