diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index eb6f95248..98b067f55 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -397,6 +397,7 @@ function quote() { limit: 1, quote: true, }).then((res) => { + if (!(res.length > 0)) return; const el = quoteButton.value as HTMLElement | null | undefined; if (el && res.length > 0) { const rect = el.getBoundingClientRect(); @@ -419,6 +420,7 @@ function quote() { limit: 1, quote: true, }).then((res) => { + if (!(res.length > 0)) return; const el = quoteButton.value as HTMLElement | null | undefined; if (el && res.length > 0) { const rect = el.getBoundingClientRect(); diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 61d4016d6..c6b0d7902 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -441,6 +441,7 @@ function quote() { limit: 1, quote: true, }).then((res) => { + if (!(res.length > 0)) return; const el = quoteButton.value as HTMLElement | null | undefined; if (el && res.length > 0) { const rect = el.getBoundingClientRect(); @@ -463,6 +464,7 @@ function quote() { limit: 1, quote: true, }).then((res) => { + if (!(res.length > 0)) return; const el = quoteButton.value as HTMLElement | null | undefined; if (el && res.length > 0) { const rect = el.getBoundingClientRect(); diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue index a701766c2..997689235 100644 --- a/packages/frontend/src/components/MkNoteSub.vue +++ b/packages/frontend/src/components/MkNoteSub.vue @@ -326,6 +326,7 @@ function quote() { limit: 1, quote: true, }).then((res) => { + if (!(res.length > 0)) return; const el = quoteButton.value as HTMLElement | null | undefined; if (el && res.length > 0) { const rect = el.getBoundingClientRect(); @@ -348,6 +349,7 @@ function quote() { limit: 1, quote: true, }).then((res) => { + if (!(res.length > 0)) return; const el = quoteButton.value as HTMLElement | null | undefined; if (el && res.length > 0) { const rect = el.getBoundingClientRect();