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