baobab-router
Advanced tools
Comparing version
@@ -7,4 +7,15 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /** | ||
* *********************** | ||
* PRIVATE STATIC METHODS: | ||
* *********************** | ||
*/ | ||
var _lodash = require('lodash.isequal'); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
@@ -562,3 +573,3 @@ * *********************** | ||
}) && update.path.length > 1) { | ||
if (_tree.get(update.path.slice(1)) !== update.value) { | ||
if (!(0, _lodash2.default)(_tree.get(update.path.slice(1)), update.value)) { | ||
_tree.set(update.path.slice(1), update.value); | ||
@@ -768,3 +779,3 @@ doCommit = true; | ||
// Baobab-Router version: | ||
BaobabRouter.version = '2.2.2'; | ||
BaobabRouter.version = '2.2.3'; | ||
@@ -771,0 +782,0 @@ // Expose private methods for unit testing: |
@@ -6,2 +6,9 @@ /** | ||
*/ | ||
import isEqual from 'lodash.isequal'; | ||
/** | ||
* *********************** | ||
* PRIVATE STATIC METHODS: | ||
* *********************** | ||
*/ | ||
const __defaultSolver = /:([^\/:]*)/g; | ||
@@ -612,3 +619,5 @@ | ||
) { | ||
if (_tree.get(update.path.slice(1)) !== update.value) { | ||
if ( | ||
!isEqual(_tree.get(update.path.slice(1)), update.value) | ||
) { | ||
_tree.set(update.path.slice(1), update.value); | ||
@@ -845,3 +854,3 @@ doCommit = true; | ||
// Baobab-Router version: | ||
BaobabRouter.version = '2.2.2'; | ||
BaobabRouter.version = '2.2.3'; | ||
@@ -848,0 +857,0 @@ // Expose private methods for unit testing: |
{ | ||
"name": "baobab-router", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "A router for Baobab", | ||
@@ -58,3 +58,6 @@ "main": "baobab-router.dist.js", | ||
} | ||
}, | ||
"dependencies": { | ||
"lodash.isequal": "^4.1.3" | ||
} | ||
} |
65950
2.3%1469
1.03%1
Infinity%+ Added
+ Added