fix indent

This commit is contained in:
dakkar 2025-03-15 19:36:28 +00:00
parent d0a074ac89
commit c9874f72b1

View file

@ -162,31 +162,31 @@ onDeactivated(() => {
}); });
async function fetchNote() { async function fetchNote() {
if (!props.showAsQuote) return; if (!props.showAsQuote) return;
if (!activityPub.value) return; if (!activityPub.value) return;
if (theNote.value) return; if (theNote.value) return;
if (fetchingTheNote.value) return; if (fetchingTheNote.value) return;
fetchingTheNote.value = true; fetchingTheNote.value = true;
try { try {
const response = await misskeyApi('ap/show', { uri: activityPub.value }); const response = await misskeyApi('ap/show', { uri: activityPub.value });
if (response.type !== 'Note') return; if (response.type !== 'Note') return;
const theNoteId = response['object'].id; const theNoteId = response['object'].id;
if (theNoteId && props.skipNoteIds && props.skipNoteIds.includes(theNoteId)) { if (theNoteId && props.skipNoteIds && props.skipNoteIds.includes(theNoteId)) {
hidePreview.value = true; hidePreview.value = true;
return; return;
}
theNote.value = response['object'];
fetchingTheNote.value = false;
} catch (err) {
if (_DEV_) {
console.error(`failed to extract note for preview of ${activityPub.value}`, err);
}
activityPub.value = null;
fetchingTheNote.value = false;
theNote.value = null;
} }
theNote.value = response['object'];
fetchingTheNote.value = false;
} catch (err) {
if (_DEV_) {
console.error(`failed to extract note for preview of ${activityPub.value}`, err);
}
activityPub.value = null;
fetchingTheNote.value = false;
theNote.value = null;
} }
}
const requestUrl = new URL(props.url); const requestUrl = new URL(props.url);
if (!['http:', 'https:'].includes(requestUrl.protocol)) throw new Error('invalid url'); if (!['http:', 'https:'].includes(requestUrl.protocol)) throw new Error('invalid url');