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

Update callback receives undefined #1759

Closed
aldeed opened this Issue Jan 15, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@aldeed
Contributor

aldeed commented Jan 15, 2014

This is an issue on the client only, and was found on 0.7.0.1.

Create a new app, and add:

var testCollection = new Meteor.Collection('test');

Insert a test doc and then update it (from a client). The second arg of the update callback will be 1, as expected.

Now remove insecure and add:

testCollection.allow({
  insert: function() {
    return true;
  },
  update: function() {
    return true;
  }
});

Again update the doc from the client. This time, the second arg of the update callback is undefined rather than 1, even though one doc was successfully updated and there were no errors.

On the server, the second arg is always correct.

@n1mmy n1mmy closed this in c8acc10 Jan 15, 2014

@n1mmy

This comment has been minimized.

Member

n1mmy commented Jan 15, 2014

Thanks! Good catch. Fixed on devel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment