Comparing version 5.7.3 to 5.7.4
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="5.7.4"></a> | ||
## [5.7.4](https://github.com/dmfay/massive-js/compare/v5.7.3...v5.7.4) (2019-01-25) | ||
### Bug Fixes | ||
* recognize stringified ints as primary key search criteria ([7ad4116](https://github.com/dmfay/massive-js/commit/7ad4116)) | ||
<a name="5.7.3"></a> | ||
@@ -7,0 +17,0 @@ ## [5.7.3](https://github.com/dmfay/massive-js/compare/v5.7.2...v5.7.3) (2019-01-20) |
@@ -139,5 +139,8 @@ 'use strict'; | ||
if (_.isNumber(criteria) || (_.isString(criteria) && isUuid.test(criteria))) { | ||
// primitive value | ||
if (_.isNumber(criteria)) { | ||
// ordinary numeric pk | ||
return true; | ||
} else if (_.isString(criteria) && (+criteria === +criteria || isUuid.test(criteria))) { // eslint-disable-line no-self-compare | ||
// stringified number or uuid | ||
return true; | ||
} else if (_.isPlainObject(criteria)) { | ||
@@ -144,0 +147,0 @@ const criteriaKeys = Object.keys(criteria); |
{ | ||
"name": "massive", | ||
"version": "5.7.3", | ||
"version": "5.7.4", | ||
"description": "A small query tool for Postgres that embraces json and makes life simpler", | ||
@@ -5,0 +5,0 @@ "homepage": "https://dmfay.github.io/massive-js/", |
217910
2473