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

Undefined check function #699

Closed
muliyul opened this issue Sep 22, 2015 · 14 comments
Closed

Undefined check function #699

muliyul opened this issue Sep 22, 2015 · 14 comments

Comments

@muliyul
Copy link

muliyul commented Sep 22, 2015

I'm getting this error when splicing a collection array on client side:

ReferenceError: check is not defined
at Array.angularMeteorCollection.factory.AngularMeteorCollection.remove (angular.js:662)
at Array.angularMeteorCollection.factory.AngularMeteorCollection._saveChanges (angular.js:836)...

the call to check():
check(keys, [Match.OneOf(String, Mongo.ObjectID)]);

What's up? :D

@jacobdr
Copy link

jacobdr commented Sep 22, 2015

Can you please provide a MeteorPad or link to a repo in order to reproduce?

@muliyul
Copy link
Author

muliyul commented Sep 22, 2015

What's a MeteorPad? and I don't have a repo set up because I'm testing capabilities for maybe future projects.

EDIT: published here: http://muli.meteor.com/

Error is thrown everytime I try to remove a party.

@jacobdr
Copy link

jacobdr commented Sep 22, 2015

MeteorPad is like jsFiddle for Meteor -- allows you to write Meteor code and share it with others.

Generally its not a good practice to create a ticket for an issue without providing the code context and information about the environment in which the unexpected behavior occurred. Otherwise how can someone from the project re-produce the error and make sure that they have fixed it?

In your case, did you download the check package? meteor install check This may only apply to Meteor v.1.2+

@unoriginalscreenname
Copy link

@jacobdr 'meteor add check' worked for me. I didn't realize that was something i needed to have installed. Might be a good idea to add that package as a dependency? Thank you!

@muliyul
Copy link
Author

muliyul commented Sep 22, 2015

That 'meteor add check' and 'meteor add ejson' did the trick. thank you.

@muliyul muliyul closed this as completed Sep 22, 2015
@jacobdr
Copy link

jacobdr commented Sep 22, 2015

I don't see what that has to do with Angular-Meteor -- its a stand-alone Meteor standard package, just like Accounts (hesitant to use the word base since that's not really true anymore as of version 1.2).

Did you see check() used somewhere in one of the tutorials? If that is the case, then maybe it should be mentioned as a pre-requisite step.

@muliyul
Copy link
Author

muliyul commented Sep 22, 2015

No I didn't see check() in the tut. I did see it was used when I spliced the collection then it threw the exception above..

@unoriginalscreenname
Copy link

Yes, i was using the angular-meteor-generator to test a few things out and it threw an error when trying to remove an item. it calls check() as part of the AngularMeteorCollection. Also, good catch @mullyul, it also threw an exception looking for ejson as well. adding both of those in worked.

@jacobdr
Copy link

jacobdr commented Sep 22, 2015

What version of Meteor are you running?

@jacobdr
Copy link

jacobdr commented Sep 22, 2015

Line 123 in angular-meteor-collection.js references the check function

Also not sure if it got updated as a dependency in the latest rc

Sorry @muliyul you may have been on to something

@Urigo Is requiring the check package a breaking change in 1.2?

@muliyul
Copy link
Author

muliyul commented Sep 23, 2015

Sorry for the late response. I was using the latest version of angular server along with the latest version of meteor

@Urigo
Copy link
Owner

Urigo commented Sep 24, 2015

Hi, thanks for the good catch.
Just release a new version with the required check dependency: angular@1.0.0-rc.7
Please let me know if that helped

@muliyul
Copy link
Author

muliyul commented Sep 24, 2015

did you include ejson too?
can't test this because I already resolved the issue on my end.

On Thu, Sep 24, 2015 at 1:30 PM, Uri Goldshtein notifications@github.com
wrote:

Hi, thanks for the good catch.
Just release a new version with the required check dependency:
angular@1.0.0-rc.7
Please let me know if that helped


Reply to this email directly or view it on GitHub
#699 (comment)
.

@Urigo
Copy link
Owner

Urigo commented Sep 24, 2015

check depends on ejson so there is no need..

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

No branches or pull requests

4 participants