diff options
| author | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-11 02:03:19 -0400 |
|---|---|---|
| committer | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-11 02:03:19 -0400 |
| commit | f3edb63189f6d0c02131011ca8bd69f4d9f8fe6a (patch) | |
| tree | f352abf3eef318e25630522af5811bc49af34ce4 /app | |
| parent | f2c719554fddd262b6c63b95324ce999a14a6029 (diff) | |
Fix NaN bug in autoincrement
Diffstat (limited to 'app')
| -rw-r--r-- | app/node_modules/okdb/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/node_modules/okdb/index.js b/app/node_modules/okdb/index.js index ffe3ff1..2cf6d8b 100644 --- a/app/node_modules/okdb/index.js +++ b/app/node_modules/okdb/index.js @@ -182,7 +182,7 @@ function autoincrement(wrapper, schema, data) { var last = wrapper.chain().sort(field).first().value(); var index = last ? last[field] : -1; var incremented = {}; - incremented[field] = (parseInt(index) + 1) % Number.MAX_SAFE_INT; + incremented[field] = (parseInt(index) + 1); return assign(data, incremented); }, data); } |
