Skip to content

Commit 18f7eb2

Browse files
committed
Fix create new note should not use default note created time
1 parent 71f61b7 commit 18f7eb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/models/note.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ module.exports = function (sequelize, DataTypes) {
223223
body = fs.readFileSync(filePath, 'utf8');
224224
note.title = LZString.compressToBase64(Note.parseNoteTitle(body));
225225
note.content = LZString.compressToBase64(body);
226-
note.createdAt = fsCreatedTime;
226+
if (filePath !== config.defaultnotepath) {
227+
note.createdAt = fsCreatedTime;
228+
}
227229
}
228230
}
229231
// if no permission specified and have owner then give editable permission, else default permission is freely

0 commit comments

Comments
 (0)