提交 2e992b5550e4acf7b8f11307601f42c88bf8c535

作者 Nick Baugh
1 个父辈 c4eac114

Fixed update_at bug

正在显示 1 个修改的文件 包含 2 行增加2 行删除
... ... @@ -19,7 +19,7 @@ exports = module.exports = function() {
19 19
20 20 var that = this
21 21
22   - that.updated_at = (!that.created_at) ? Date.now() : that._id.getTimestamp()
  22 + that.updated_at = _.isUndefined(that.created_at) ? that._id.getTimestamp() : new Date();
23 23
24 24 if (!that.created_at)
25 25 that.created_at = that._id.getTimestamp()
... ... @@ -37,7 +37,7 @@ exports = module.exports = function() {
37 37 getters: true
38 38 })
39 39
40   - Schema.plugin(jsonSelect, '-_id -__v')
  40 + Schema.plugin(jsonSelect, '-_id')
41 41
42 42 return Schema
43 43
... ...
注册登录 后发表评论