@hydrogenjs/redux-hydrogen
Advanced tools
Comparing version 0.3.2 to 0.3.5
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="0.3.5"></a> | ||
## [0.3.5](https://github.com/Lemonpeach/redux-hydrogen/compare/v0.3.4...v0.3.5) (2018-06-16) | ||
### Bug Fixes | ||
* **redux-hydrogen:** accept null as a query parameter ([1595a4e](https://github.com/Lemonpeach/redux-hydrogen/commit/1595a4e)) | ||
<a name="0.3.2"></a> | ||
@@ -8,0 +19,0 @@ ## [0.3.2](https://github.com/Lemonpeach/redux-hydrogen/compare/v0.3.1...v0.3.2) (2018-06-10) |
@@ -37,3 +37,5 @@ 'use strict'; | ||
(0, _each2.default)(query, function (value, key) { | ||
if (!(0, _isNil2.default)(value.$regexp)) { | ||
if ((0, _isNil2.default)(value)) { | ||
q[key] = value; | ||
} else if (!(0, _isNil2.default)(value.$regexp)) { | ||
q[key] = { $regex: value.$regexp }; | ||
@@ -40,0 +42,0 @@ } else if (!(0, _isNil2.default)(value.$iRegexp)) { |
{ | ||
"name": "@hydrogenjs/redux-hydrogen", | ||
"version": "0.3.2", | ||
"version": "0.3.5", | ||
"description": "Don't waste your time writing redux boilerplate.", | ||
@@ -10,3 +10,4 @@ "main": "lib/index.js", | ||
"test": "eslint src && jest src", | ||
"build": "npm run clean && npm run babel" | ||
"build": "npm run clean && npm run babel", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
@@ -13,0 +14,0 @@ "files": [ |
@@ -67,2 +67,14 @@ import { verbs } from 'actions'; | ||
test('find: accepts null query value', () => { | ||
expect(selectors.find( | ||
dotprop.set( | ||
initialState, | ||
'hydrogen.people.data', | ||
{ 1: { id: 1, name: null } } | ||
), | ||
'people', | ||
{ name: null } | ||
)).toEqual([{ id: 1, name: null }]); | ||
}); | ||
test('first', () => { | ||
@@ -69,0 +81,0 @@ expect(selectors.first(initialState, 'people', { id: 1 })).toEqual(undefined); |
@@ -15,3 +15,5 @@ import { sorter, filterQuery } from '@feathersjs/commons'; | ||
(value, key) => { | ||
if (!isNil(value.$regexp)) { | ||
if (isNil(value)) { | ||
q[key] = value; | ||
} else if (!isNil(value.$regexp)) { | ||
q[key] = { $regex: value.$regexp }; | ||
@@ -18,0 +20,0 @@ } else if (!isNil(value.$iRegexp)) { |
60537
1195