Fix bug preventing setting a highlight note to an empty string

This commit is contained in:
Jackson Harper 2023-06-26 10:14:23 +08:00
parent 83012946dc
commit b916b4a065

View file

@ -234,8 +234,8 @@ export function MarkdownNote(props: MarkdownNote): JSX.Element {
<Button
style="ctaDarkYellow"
onClick={(event) => {
const value = editorRef.current?.getMdValue()
if (value) {
if (editorRef.current) {
const value = editorRef.current.getMdValue()
const updateTime = new Date()
setLastChanged(updateTime)
props.saveText(value, updateTime, true)