Skip to content

Commit

Permalink
refactor: remove useless question mark from mobile demo url (#1462)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript authored Feb 7, 2023
1 parent c5dc386 commit ae4c9a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion suites/theme-mobile/src/builtins/Previewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const MobilePreviewer: FC<IPreviewerProps> = (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));

Expand Down

0 comments on commit ae4c9a5

Please sign in to comment.