forked from naskya/firefish
fix: null error in renote button
This commit is contained in:
parent
9a415f9826
commit
ffaccde714
1 changed files with 10 additions and 7 deletions
|
@ -73,13 +73,16 @@ useTooltip(buttonRef, async (showing) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const hasRenotedBefore = ref(false);
|
const hasRenotedBefore = ref(false);
|
||||||
os.api("notes/renotes", {
|
|
||||||
|
if ($i != null) {
|
||||||
|
os.api("notes/renotes", {
|
||||||
noteId: props.note.id,
|
noteId: props.note.id,
|
||||||
userId: $i.id,
|
userId: $i.id,
|
||||||
limit: 1,
|
limit: 1,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
hasRenotedBefore.value = res.length > 0;
|
hasRenotedBefore.value = res.length > 0;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
||||||
pleaseLogin();
|
pleaseLogin();
|
||||||
|
|
Loading…
Reference in a new issue