mirror of
https://github.com/status-im/codimd.git
synced 2025-01-27 02:46:28 +00:00
fix: lint
Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
parent
20b10b7bb7
commit
965cca9d39
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user