fix: lint

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2021-04-28 17:37:43 +08:00
parent 20b10b7bb7
commit 965cca9d39
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
1 changed files with 2 additions and 3 deletions

View File

@ -92,18 +92,17 @@ module.exports = function (sequelize, DataTypes) {
return new Promise(function (resolve, reject) {
// if no content specified then use default note
if (!note.content) {
var body = null
let filePath = config.defaultNotePath
if (note.alias) {
const notePathInDocPath = path.join(config.docsPath, path.basename(node.alias) + '.md')
const notePathInDocPath = path.join(config.docsPath, path.basename(note.alias) + '.md')
if (Note.checkFileExist(notePathInDocPath)) {
filePath = notePathInDocPath
}
}
if (Note.checkFileExist(filePath)) {
let noteInFS = readFileSystemNote(filePath)
const noteInFS = readFileSystemNote(filePath)
note.title = noteInFS.title
note.content = noteInFS.content
if (filePath !== config.defaultNotePath) {