diff --git a/README.md b/README.md index 41724ef..4ed64d3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Clementine + Clementine is a no-frills, self-hosted plain text editor. It doesn't do fancy Markdown formatting or hyperlinks, though you can certainly still use it to write Markdown! All it does is get out of your way and give you a place to type. @@ -8,6 +9,7 @@ Users beware: Clementine is currently at a very early stage of development! I can't guarantee it won't eat your work, and it (just barely) meets my own needs. ## Planned features + Clementine is already architected to be offline-friendly: all data is in IndexedDB. It's not a proper PWA yet, so you do need an internet connection on mobile in order to initially load the page. But once loaded, no further connection is needed. diff --git a/src/components/Editor.tsx b/src/components/Editor.tsx index 9a95ab0..7e809c8 100644 --- a/src/components/Editor.tsx +++ b/src/components/Editor.tsx @@ -17,9 +17,12 @@ import { useNavbar } from './App'; import { useParams } from '@solidjs/router'; import _ from 'lodash'; import { closeDoc, getDocStats, openDoc } from '../persistence'; +import { assert } from '../util'; function Editor() { const { id: fileId } = useParams(); + assert(fileId, 'Editor component loaded without a file'); + const { setFileId, setNumUpdates } = useNavbar(); onMount(() => { setFileId(fileId);