Răsfoiți Sursa

allow access to /trash

sou 7 ani în urmă
părinte
comite
7dedf4ced7
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      lib/models/revision.js

+ 1 - 1
lib/models/revision.js

@@ -12,7 +12,7 @@ module.exports = function(crowi) {
     body: { type: String, required: true, get: (data) => {
       // replace CR/CRLF to LF above v3.1.5
       // see https://github.com/weseek/growi/issues/463
-      return data.replace(/\r\n?/g, '\n');
+      return data && data.replace(/\r\n?/g, '\n');
     }},
     format: { type: String, default: 'markdown' },
     author: { type: ObjectId, ref: 'User' },