Skip to content

Commit

Permalink
Bump 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Yomguithereal committed Feb 6, 2017
1 parent 60753b1 commit 01fbe63
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v2.4.1

* Fixing `tree/cursor.splice` descriptor ([@Nimelrian](https://github.com/Nimelrian)).

## v2.4.0

* Handling non-enumerable properties ([@BrendanAnnable](https://github.com/BrendanAnnable)).
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "baobab",
"main": "build/baobab.min.js",
"version": "2.4.0",
"version": "2.4.1",
"homepage": "https://github.com/Yomguithereal/baobab",
"author": {
"name": "Guillaume Plique",
Expand Down
10 changes: 6 additions & 4 deletions build/baobab.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Baobab
*
* Homepage: https://github.com/Yomguithereal/baobab
* Version: 2.4.0
* Version: 2.4.1
* Author: Yomguithereal (Guillaume Plique)
* License: MIT
*/
Expand Down Expand Up @@ -1146,7 +1146,7 @@ Baobab.helpers = helpers;
/**
* Version
*/
Baobab.VERSION = '2.4.0';
Baobab.VERSION = '2.4.1';
module.exports = exports['default'];

},{"./cursor":3,"./helpers":4,"./monkey":5,"./type":6,"./update":7,"./watcher":8,"emmett":1}],3:[function(require,module,exports){
Expand Down Expand Up @@ -2581,6 +2581,7 @@ function solveUpdate(affectedPaths, comparedPaths) {
*/

function splice(array, startIndex, nb) {
if (nb === undefined) nb = array.length - startIndex;else if (nb === null) nb = 0;else if (Number.isNaN(Number.parseInt(nb))) throw new Error('argument nb ' + nb + ' can not be parsed into a number!');
nb = Math.max(0, nb);

// Solving startIndex
Expand Down Expand Up @@ -3015,9 +3016,10 @@ type.primitive = function (target) {
* @return {boolean}
*/
type.splicer = function (target) {
if (!type.array(target) || target.length < 2) return false;
if (!type.array(target) || target.length < 1) return false;
if (target.length > 1 && Number.isNaN(Number.parseInt(target[1]))) return false;

return anyOf(target[0], ['number', 'function', 'object']) && type.number(target[1]);
return anyOf(target[0], ['number', 'function', 'object']);
};

/**
Expand Down
6 changes: 3 additions & 3 deletions build/baobab.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "baobab",
"version": "2.4.0",
"version": "2.4.1",
"description": "JavaScript persistent data tree with cursors.",
"main": "./dist/baobab.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/baobab.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,4 +591,4 @@ Baobab.helpers = helpers;
/**
* Version
*/
Baobab.VERSION = '2.4.0';
Baobab.VERSION = '2.4.1';

0 comments on commit 01fbe63

Please sign in to comment.