fix: null error in renote button
This commit is contained in:
parent
fd3d788aad
commit
c21a24ee92
@ -73,13 +73,16 @@ useTooltip(buttonRef, async (showing) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const hasRenotedBefore = ref(false);
|
const hasRenotedBefore = ref(false);
|
||||||
os.api("notes/renotes", {
|
|
||||||
noteId: props.note.id,
|
if ($i != null) {
|
||||||
userId: $i.id,
|
os.api("notes/renotes", {
|
||||||
limit: 1,
|
noteId: props.note.id,
|
||||||
}).then((res) => {
|
userId: $i.id,
|
||||||
hasRenotedBefore.value = res.length > 0;
|
limit: 1,
|
||||||
});
|
}).then((res) => {
|
||||||
|
hasRenotedBefore.value = res.length > 0;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
||||||
pleaseLogin();
|
pleaseLogin();
|
||||||
|
Loading…
Reference in New Issue
Block a user