From f3edb63189f6d0c02131011ca8bd69f4d9f8fe6a Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Sat, 11 Apr 2015 02:03:19 -0400 Subject: Fix NaN bug in autoincrement --- app/node_modules/okdb/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/node_modules/okdb/index.js') 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); } -- cgit v1.2.3-70-g09d2