Skip to content
Snippets Groups Projects
Verified Commit 684be7d7 authored by Zero Calorie's avatar Zero Calorie
Browse files

fix: fix type error of useNoteCapture

parent 54addd03
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ export function useNoteCapture(props: {
const pureNote = props.pureNote !== undefined ? props.pureNote : props.note;
const connection = $i ? useStream() : null;
async function onStreamNoteUpdated(noteData): void {
async function onStreamNoteUpdated(noteData): Promise<void> {
const { type, id, body } = noteData;
if ((id !== note.value.id) && (id !== pureNote.value.id)) return;
......@@ -81,7 +81,7 @@ export function useNoteCapture(props: {
case 'pollVoted': {
const choice = body.choice;
const choices = [...note.value.poll.choices];
const choices = [...note.value.poll!.choices];
choices[choice] = {
...choices[choice],
votes: choices[choice].votes + 1,
......@@ -90,7 +90,7 @@ export function useNoteCapture(props: {
} : {}),
};
note.value.poll.choices = choices;
note.value.poll!.choices = choices;
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment