From b3cf98b329ae07f8af4536e0675123cff4bf770b Mon Sep 17 00:00:00 2001 From: James Tsai Date: Tue, 21 Jul 2020 09:16:32 +0800 Subject: [PATCH] Fix linter Signed-off-by: James Tsai --- lib/note/index.js | 10 +++++----- public/js/extra.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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 })