paramsの中身がない場合は `?` がつかないように修正

This commit is contained in:
kakkokari-gtyih 2024-06-29 21:11:00 +09:00
parent 153a25bd30
commit 610d7d59e6
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ export function getEmbedCode(path: string, params?: EmbedParams): string {
let paramString = '';
if (params) {
const searchParams = new URLSearchParams(normalizeEmbedParams(params));
paramString = '?' + searchParams.toString();
paramString = searchParams.toString() === '' ? '' : '?' + searchParams.toString();
}
const iframeCode = [