diff --git a/lib/note/index.js b/lib/note/index.js index f0e5de20..664ad465 100644 --- a/lib/note/index.js +++ b/lib/note/index.js @@ -233,7 +233,7 @@ function listMyNotes (req, res) { } const deleteNote = async (req, res) => { - if(req.isAuthenticated()) { + if (req.isAuthenticated()) { const noteId = await Note.parseNoteIdAsync(req.params.noteId) try { const destroyed = await Note.destroy({ @@ -260,21 +260,21 @@ const deleteNote = async (req, res) => { } const updateNote = async (req, res) => { - if(req.isAuthenticated()) { + if (req.isAuthenticated()) { const noteId = await Note.parseNoteIdAsync(req.params.noteId) try { const note = await Note.findOne({ where: { - id: noteId, + id: noteId } }) if (!note) { logger.error('Update note failed: Can\'t find the note.') return errorNotFound(req, res) } - + const updated = await note.update({ - content: req.body.content, + content: req.body.content }) if (!updated) { logger.error('Update note failed: Write data error.') diff --git a/public/js/extra.js b/public/js/extra.js index 954a161c..8870b57b 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -516,7 +516,7 @@ export function finishView (view) { $value.unwrap() try { const data = transform(content) - $elem.html(`
`) + $elem.html('
') markmap($elem.find('svg')[0], data, { duration: 0 })