diff --git a/packages/client/src/components/MkRenoteButton.vue b/packages/client/src/components/MkRenoteButton.vue index 90ecb3217..0c0790d86 100644 --- a/packages/client/src/components/MkRenoteButton.vue +++ b/packages/client/src/components/MkRenoteButton.vue @@ -73,13 +73,16 @@ useTooltip(buttonRef, async (showing) => { }); const hasRenotedBefore = ref(false); -os.api("notes/renotes", { - noteId: props.note.id, - userId: $i.id, - limit: 1, -}).then((res) => { - hasRenotedBefore.value = res.length > 0; -}); + +if ($i != null) { + os.api("notes/renotes", { + noteId: props.note.id, + userId: $i.id, + limit: 1, + }).then((res) => { + hasRenotedBefore.value = res.length > 0; + }); +} const renote = (viaKeyboard = false, ev?: MouseEvent) => { pleaseLogin();