summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorfutchitwo <74236683+futchitwo@users.noreply.github.com>2023-01-15 23:47:04 +0900
committerGitHub <noreply@github.com>2023-01-15 23:47:04 +0900
commit7795ff0c956134ca22950f561cddffa2dd109719 (patch)
tree0172edd2b69b9f018881ca5854abf279cbcafb16 /packages
parentfix(client): Fix #9600 chat paging issue (diff)
downloadmisskey-7795ff0c956134ca22950f561cddffa2dd109719.tar.gz
misskey-7795ff0c956134ca22950f561cddffa2dd109719.tar.bz2
misskey-7795ff0c956134ca22950f561cddffa2dd109719.zip
fix: note embedding in Pages editor (#9604)
Diffstat (limited to 'packages')
-rw-r--r--packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue18
1 files changed, 7 insertions, 11 deletions
diff --git a/packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue b/packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue
index 3efad47fc9..d8a7eb85aa 100644
--- a/packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue
+++ b/packages/frontend/src/pages/page-editor/els/page-editor.el.note.vue
@@ -37,20 +37,16 @@ const emit = defineEmits<{
let id: any = $ref(props.modelValue.note);
let note: any = $ref(null);
-watch(id, async () => {
+watch($$(id), async () => {
if (id && (id.startsWith('http://') || id.startsWith('https://'))) {
- emit('update:modelValue', {
- ...props.modelValue,
- note: (id.endsWith('/') ? id.slice(0, -1) : id).split('/').pop(),
- });
- } else {
- emit('update:modelValue', {
- ...props.modelValue,
- note: id,
- });
+ id = (id.endsWith('/') ? id.slice(0, -1) : id).split('/').pop();
}
- note = await os.api('notes/show', { noteId: props.modelValue.note });
+ emit('update:modelValue', {
+ ...props.modelValue,
+ note: id,
+ });
+ note = await os.api('notes/show', { noteId: id });
}, {
immediate: true,
});