正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -21,7 +21,7 @@ exports = module.exports = function(logger, settings) { | @@ -21,7 +21,7 @@ exports = module.exports = function(logger, settings) { | ||
21 | 21 | ||
22 | if (_.isObject(err) && _.isNumber(err.code) && err.code === 11000) { | 22 | if (_.isObject(err) && _.isNumber(err.code) && err.code === 11000) { |
23 | // <https://github.com/LearnBoost/mongoose/issues/2129> | 23 | // <https://github.com/LearnBoost/mongoose/issues/2129> |
24 | - var field = err.message.split('index: test.')[1].split('.$')[1] | 24 | + var field = err.message.split('index: ')[1].split('.$')[1] |
25 | // now we have `email_1 dup key` | 25 | // now we have `email_1 dup key` |
26 | field = field.split(' dup key')[0] | 26 | field = field.split(' dup key')[0] |
27 | field = field.substring(0, field.lastIndexOf('_')) | 27 | field = field.substring(0, field.lastIndexOf('_')) |
请
注册
或
登录
后发表评论