Ver código fonte

null check on id

James Allen 12 anos atrás
pai
commit
e4e14602f1

+ 1 - 1
services/docstore/app/coffee/HttpController.coffee

@@ -66,7 +66,7 @@ module.exports = HttpController =
 
 
 	_buildDocView: (doc) -> 
 	_buildDocView: (doc) -> 
 		return {
 		return {
-			_id:     doc._id.toString()
+			_id:     doc._id?.toString()
 			lines:   doc.lines
 			lines:   doc.lines
 			rev:     doc.rev
 			rev:     doc.rev
 		}
 		}