fix: create new note
This commit is contained in:
@@ -233,7 +233,7 @@
|
|||||||
{
|
{
|
||||||
label: $i18n.t('Create a new note'),
|
label: $i18n.t('Create a new note'),
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
await goto(`/notes${query ? `?content=${query}` : ''}`);
|
await goto(`/notes?content=${query}`);
|
||||||
show = false;
|
show = false;
|
||||||
onClose();
|
onClose();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -303,12 +303,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if ($page.url.searchParams.get('content')) {
|
if ($page.url.searchParams.get('content') !== null) {
|
||||||
const content = $page.url.searchParams.get('content') ?? '';
|
const content = $page.url.searchParams.get('content') ?? '';
|
||||||
if (content) {
|
createNoteHandler(content);
|
||||||
createNoteHandler(content);
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await init();
|
await init();
|
||||||
|
|||||||
Reference in New Issue
Block a user