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

Publish this.changed API too strict #850

Closed
mitar opened this Issue Mar 20, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@mitar
Collaborator

mitar commented Mar 20, 2013

I think that Meteor.publish this.changed API is too strict. I am getting "Could not find field to clear" error when I am trying to set a field to undefined, just to be sure, because I have multiple program paths. Wouldn't it be better that it would simply ignore unsetting the value if it is not set in the first place? What is the use rationale why it is necessary to throw an error in this case?

cmather pushed a commit that referenced this issue Mar 21, 2013

Chris Mather
Fixes #850. Publish this.changed unset a field that doesn't exist.
This used to throw an error "Could not find field to clear". Now it
doesn't.

@cmather cmather closed this Mar 21, 2013

@mitar

This comment has been minimized.

Collaborator

mitar commented Mar 21, 2013

Great!

@alanning

This comment has been minimized.

Contributor

alanning commented Mar 28, 2013

Thanks for the patch, Chris. Just ran across this issue myself and this resolved it.

sdarnell referenced this issue in sdarnell/meteor-win Apr 7, 2013

Fixes #850. Publish this.changed unset a field that doesn't exist.
This used to throw an error "Could not find field to clear". Now it
doesn't.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment