fix: devビルドでURLプレビューに失敗した場合に起こる不具合を修正 (MisskeyIO#139)

This commit is contained in:
まっちゃとーにゅ
2023-08-07 23:14:34 +09:00
committed by GitHub
parent 2445f6635c
commit 42a90f56e1
2 changed files with 11 additions and 7 deletions

View File

@@ -142,8 +142,8 @@ window.fetch(`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${versatileLa
return res.json();
})
.then((info: SummalyResult) => {
if (info.url == null) {
.then((info?: SummalyResult) => {
if (!info?.url) {
fetching = false;
unknownUrl = true;
return;