Skip to content

Commit

Permalink
Breaking change - geb no longer available on server, and made deep me…
Browse files Browse the repository at this point in the history
…rging the default update behaviour (leaving option to turn off)
  • Loading branch information
lorengreenfield committed Jul 17, 2017
1 parent 6ba6067 commit 2853d5d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ geb.on('fieldUpdate', newValue => {
value: newValue
}
}, {
deepMerge: true
deepMerge: false//deep merging on by default, set to false o overwrite whole objects without merging
})
});

Expand Down
6 changes: 3 additions & 3 deletions dist/halfcab.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ function setMaxStates(num){

function updateState(updateObject, options){

if(options && options.deepMerge){
states.push(Object.assign({}, merge(getLatestState(), updateObject)));
}else{
if(options && options.deepMerge === false){
states.push(Object.assign({}, getLatestState(), updateObject));
}else{
states.push(Object.assign({}, merge(getLatestState(), updateObject)));
}
if(states.length > maxStates){
states.shift();
Expand Down
6 changes: 3 additions & 3 deletions halfcab.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ function setMaxStates(num){

function updateState(updateObject, options){

if(options && options.deepMerge){
states.push(Object.assign({}, merge(getLatestState(), updateObject)));
}else{
if(options && options.deepMerge === false){
states.push(Object.assign({}, getLatestState(), updateObject));
}else{
states.push(Object.assign({}, merge(getLatestState(), updateObject)));
}
if(states.length > maxStates){
states.shift();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "halfcab",
"version": "1.9.1",
"version": "2.0.0",
"description": "A simple universal JavaScript framework focused on making use of es2015 template strings to build components.",
"main": "dist/halfcab.js",
"module": "halfcab.js",
Expand Down

0 comments on commit 2853d5d

Please sign in to comment.