fix code quality issues

This commit is contained in:
まっちゃとーにゅ 2024-01-31 06:18:54 +09:00
parent 9ffa56aa1b
commit b6f6c3ea18
No known key found for this signature in database
GPG key ID: 143DE582A97FE052
27 changed files with 63 additions and 64 deletions

View file

@ -212,14 +212,15 @@ const note = ref(deepClone(props.note));
// plugin
if (noteViewInterruptors.length > 0) {
onMounted(async () => {
let result: Misskey.entities.Note | null = deepClone(note.value);
let result = deepClone(note.value);
for (const interruptor of noteViewInterruptors) {
try {
result = await interruptor.handler(result!) as Misskey.entities.Note | null;
if (result === null) {
const r = await interruptor.handler(result) as Misskey.entities.Note | null;
if (r === null) {
isDeleted.value = true;
return;
}
result = r;
} catch (err) {
console.error(err);
}