Skip to content
Snippets Groups Projects
Commit c46b45a4 authored by tamaina's avatar tamaina
Browse files

Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop

parents 9385767b 7795ff0c
No related branches found
No related tags found
No related merge requests found
......@@ -37,20 +37,16 @@ const emit = defineEmits<{
let id: any = $ref(props.modelValue.note);
let note: any = $ref(null);
watch(id, async () => {
watch($$(id), async () => {
if (id && (id.startsWith('http://') || id.startsWith('https://'))) {
emit('update:modelValue', {
...props.modelValue,
note: (id.endsWith('/') ? id.slice(0, -1) : id).split('/').pop(),
});
} else {
emit('update:modelValue', {
...props.modelValue,
note: id,
});
id = (id.endsWith('/') ? id.slice(0, -1) : id).split('/').pop();
}
note = await os.api('notes/show', { noteId: props.modelValue.note });
emit('update:modelValue', {
...props.modelValue,
note: id,
});
note = await os.api('notes/show', { noteId: id });
}, {
immediate: true,
});
......
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