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

Cleanup #94

Merged
merged 12 commits into from
Jan 2, 2018
Merged

Cleanup #94

merged 12 commits into from
Jan 2, 2018

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Jan 2, 2018

This is just a bit of cleanup from migrating this code to Java.

The "big" change in here is that _fieldsProto is now {} instead of null for empty documents.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 2, 2018
src/document.js Outdated
@@ -576,8 +576,9 @@ class DocumentSnapshot {
* @return {boolean}
*/
get isEmpty() {
return !this._fieldsProto || isEmptyObject(this._fieldsProto);
return this._fieldsProto === undefined || isEmptyObject(this._fieldsProto);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

src/document.js Outdated
@@ -652,7 +650,6 @@ class DocumentSnapshot {

/**
* Encodes a JavaScrip value into the Firestore 'Value' representation.

This comment was marked as spam.

This comment was marked as spam.

@codecov
Copy link

codecov bot commented Jan 2, 2018

Codecov Report

Merging #94 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #94   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        1599   1593    -6     
=====================================
- Hits         1599   1593    -6
Impacted Files Coverage Δ
src/document.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9bd8bad...dc26071. Read the comment docs.

@stephenplusplus
Copy link
Contributor

Linting failed :( Probably another case of your local copy pulling from npm’s cache.

@schmidt-sebastian
Copy link
Contributor Author

Linting failed :( Probably another case of your local copy pulling from npm’s cache.

Yes, I still don't quite know where that is coming from. I continued on some other PRs as well that have the same errors which I will send out shortly. When I finally figure out the root cause, I'll update them all in one go.

@stephenplusplus
Copy link
Contributor

I'll just approve so you're good to merge whenever linting stops being a downer.

@schmidt-sebastian
Copy link
Contributor Author

Whaaaa.... Updating eslint and prettier to their latest dependencies worked.

@schmidt-sebastian schmidt-sebastian merged commit 0e43adf into master Jan 2, 2018
@ghost ghost removed the cla: yes This human has signed the Contributor License Agreement. label Jan 2, 2018
@stephenplusplus stephenplusplus deleted the mrschmidt-argumentcleanup branch January 2, 2018 20:49
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.

None yet

3 participants