Skip to content

Commit

Permalink
Merge pull request #4 from pagarme/remove-unnecessary-check
Browse files Browse the repository at this point in the history
fix: remove unnecessary check
  • Loading branch information
gustavolivrare committed Apr 25, 2018
2 parents 518e276 + 32b5335 commit e95d364
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ LivePatch.prototype._patch = function(type, value) {
var top = this.stack[this.stack.length - 1];
var parent = this.stack[this.stack.length - 2];

if (!top) return

if (top.type == 'array') {
parent = top;
this._pushKey(parent.counter.toString());
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": "livepatch",
"version": "1.1.2",
"version": "1.1.1",
"description": "Patch JSON streams on the fly",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit e95d364

Please sign in to comment.