mirror of
https://github.com/typicode/json-server.git
synced 2025-08-02 19:52:20 +08:00
refactor: update lowdb and lodash
This commit is contained in:
@ -41,7 +41,7 @@ function createId (coll) {
|
||||
if (_.isEmpty(coll)) {
|
||||
return 1
|
||||
} else {
|
||||
var id = _.max(coll, function (doc) {
|
||||
var id = _.maxBy(coll, function (doc) {
|
||||
return doc[idProperty]
|
||||
})[idProperty]
|
||||
|
||||
|
Reference in New Issue
Block a user