summaryrefslogtreecommitdiff
path: root/packages/client/src/components/MkNote.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-11-17 09:31:07 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-11-17 09:31:07 +0900
commitd5aee2ea58a16e0cf65213fab9e46192882feba9 (patch)
tree037be7ad7b26abf647faa0f4ee6a6a96ba37fa95 /packages/client/src/components/MkNote.vue
parentfix typo on CleanRemoteFilesProcessorService (#9171) (diff)
downloadsharkey-d5aee2ea58a16e0cf65213fab9e46192882feba9.tar.gz
sharkey-d5aee2ea58a16e0cf65213fab9e46192882feba9.tar.bz2
sharkey-d5aee2ea58a16e0cf65213fab9e46192882feba9.zip
improve performance
Diffstat (limited to 'packages/client/src/components/MkNote.vue')
-rw-r--r--packages/client/src/components/MkNote.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue
index efe786ba4b..97eadb1945 100644
--- a/packages/client/src/components/MkNote.vue
+++ b/packages/client/src/components/MkNote.vue
@@ -129,6 +129,7 @@ import { $i } from '@/account';
import { i18n } from '@/i18n';
import { getNoteMenu } from '@/scripts/get-note-menu';
import { useNoteCapture } from '@/scripts/use-note-capture';
+import { deepClone } from '@/scripts/clone';
const props = defineProps<{
note: misskey.entities.Note;
@@ -137,12 +138,12 @@ const props = defineProps<{
const inChannel = inject('inChannel', null);
-let note = $ref(JSON.parse(JSON.stringify(props.note)));
+let note = $ref(deepClone(props.note));
// plugin
if (noteViewInterruptors.length > 0) {
onMounted(async () => {
- let result = JSON.parse(JSON.stringify(note));
+ let result = deepClone(note);
for (const interruptor of noteViewInterruptors) {
result = await interruptor.handler(result);
}