From 9a3219f12ef95f4b99fba9d734f8330f5b32a7a1 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Tue, 10 Jun 2025 09:51:45 +0900
Subject: fix(frontend):
 Plugin:register_note_view_interruptor()によるノートの書き換えが機能しない問題を修正
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix #16180
---
 packages/frontend/src/components/MkNote.vue | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

(limited to 'packages/frontend/src/components/MkNote.vue')

diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index 4a78d00665..040c2acdc2 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -268,17 +268,15 @@ let note = deepClone(props.note);
 // plugin
 const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
 if (noteViewInterruptors.length > 0) {
-	onMounted(async () => {
-		let result: Misskey.entities.Note | null = deepClone(note);
-		for (const interruptor of noteViewInterruptors) {
-			try {
-				result = await interruptor.handler(result!) as Misskey.entities.Note | null;
-			} catch (err) {
-				console.error(err);
-			}
+	let result: Misskey.entities.Note | null = deepClone(note);
+	for (const interruptor of noteViewInterruptors) {
+		try {
+			result = await interruptor.handler(result!) as Misskey.entities.Note | null;
+		} catch (err) {
+			console.error(err);
 		}
-		note = result as Misskey.entities.Note;
-	});
+	}
+	note = result as Misskey.entities.Note;
 }
 
 const isRenote = Misskey.note.isPureRenote(note);
-- 
cgit v1.2.3-freya

