Merge pull request #347 from codimd/backport-345

findNoteOrCreate: Create new note with empty string instead of `null`
This commit is contained in:
Sheogorath 2020-04-28 18:40:39 +02:00 committed by GitHub
commit b79341f406
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,7 @@ exports.findNote = function (req, res, callback, include) {
include: include || null
}).then(function (note) {
if (!note) {
return exports.newNote(req, res, null)
return exports.newNote(req, res, '')
}
if (!exports.checkViewPermission(req, note)) {
return errors.errorForbidden(res)