From 8366984b2b81d0f13fb2c705ccf5cc5062bc7d4e Mon Sep 17 00:00:00 2001 From: ikasoba <57828948+ikasoba@users.noreply.github.com> Date: Fri, 3 Nov 2023 19:44:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20URL=E3=83=97=E3=83=AC=E3=83=93=E3=83=A5?= =?UTF-8?q?=E3=83=BC=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#12222)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * プレビューが表示されないのを修正 * 修正 * Update packages/frontend/src/components/MkUrlPreview.vue --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> --- packages/frontend/src/components/MkUrlPreview.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/MkUrlPreview.vue b/packages/frontend/src/components/MkUrlPreview.vue index e2844f8fa..e4a6a87c2 100644 --- a/packages/frontend/src/components/MkUrlPreview.vue +++ b/packages/frontend/src/components/MkUrlPreview.vue @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only :style="player.width ? `padding: ${(player.height || 0) / player.width * 100}% 0 0` : `padding: ${(player.height || 0)}px 0 0`" > <iframe - v-if="player.url.startsWith('http://') || player.url.startsWith('https://')" + v-if="player.url?.startsWith('http://') || player.url?.startsWith('https://')" sandbox="allow-popups allow-scripts allow-storage-access-by-user-activation allow-same-origin" scrolling="no" :allow="player.allow.join(';')" @@ -118,11 +118,12 @@ let description = $ref<string | null>(null); let thumbnail = $ref<string | null>(null); let icon = $ref<string | null>(null); let sitename = $ref<string | null>(null); -let player = $ref({ +let player = $ref<SummalyResult['player']>({ url: null, width: null, height: null, -} as SummalyResult['player']); + allow: [], +}); let playerEnabled = $ref(false); let tweetId = $ref<string | null>(null); let tweetExpanded = $ref(props.detail);