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

Merge data snapshots #27

Merged
merged 4 commits into from
May 4, 2016
Merged

Conversation

ibash
Copy link
Contributor

@ibash ibash commented May 4, 2016

Fixes #26 by merging root and newData when trying writes.

@@ -278,7 +238,8 @@ Ruleset.prototype.tryWrite = function(path, root, newData, auth, skipWrite, skip
// write encompasses both the cascading write rules and the
// non-cascading validate rules

var newDataRoot = makeNewDataSnap(path, RuleDataSnapshot.convert(newData));
var newDataRoot = makeNewDataSnap(path, newData);
newDataRoot = root.merge(newDataRoot)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put these on one line, like so:

var newDataRoot = root.merge(makeNewDataSnap(path, newData));

@goldibex
Copy link
Owner

goldibex commented May 4, 2016

This solves a whole host of problems. Thank you so much for submitting.

Once that one change is made, I'll merge and release.

@ibash
Copy link
Contributor Author

ibash commented May 4, 2016

Happy to help :)

@goldibex
Copy link
Owner

goldibex commented May 4, 2016

LGTM

@goldibex goldibex merged commit 6f39c7e into goldibex:master May 4, 2016
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.

2 participants