Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes swapping objects. #35

Merged
merged 1 commit into from
Jan 5, 2015

Conversation

jamesplease
Copy link
Contributor

This resolves #30.

It needs tests, but I figured I'd open the PR to get the discussion going.

To test,

// On master, you'll get an error
var patch = jsonpatch.compare({a: {}}, {a: null});

// On my branch, you get a diff:
patch === {
  op: "replace"
  path: "/a"
  value: true
};

@jamesplease
Copy link
Contributor Author

ping @warpech @Starcounter-Jack @maca

@ifeltsweet
Copy link

Why is this not being merged?

@NiotoMOto
Copy link

@Starcounter-Jack @tomalec can you merge this please ?

@warpech
Copy link
Collaborator

warpech commented Jan 5, 2015

I will merge it in 0.5.1

warpech added a commit that referenced this pull request Jan 5, 2015
@warpech warpech merged commit 1ea71b9 into Starcounter-Jack:master Jan 5, 2015
warpech added a commit that referenced this pull request Jan 5, 2015
@gdibble
Copy link

gdibble commented Apr 17, 2015

good fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Object.keys called on non-object...
5 participants