fix code quality issues
This commit is contained in:
parent
9ffa56aa1b
commit
b6f6c3ea18
27 changed files with 63 additions and 64 deletions
|
@ -240,14 +240,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue