Lepozepo / cloudinary

MIT License
94 stars 42 forks source link

ReferenceError: check is not defined in 4.0.3 #54

Closed chmac closed 8 years ago

chmac commented 8 years ago

I noticed in the commit log you added an if check before the check() calls, then removed it again in a subsequent commit. Was the removal deliberate? Why was it added in the first place?

I'm seeing this error, where the server complains that check is undefined on my laptop, but I wasn't seeing the error on my desktop. As far as I can tell, nothing has changed between the two machines.

As a side note, to check for the existence of functions like that in coffeescript one can use the existential operator like check? foo, bar. This ensures that check is both defined and of type function before calling it. Gotta love the existential operator. :-)

chmac commented 8 years ago

Oh, in case it's not clear, I'm seeing this issue in server/signature.coffee.

chmac commented 8 years ago

Interesting, I cloned this repo directly into packages/ and the error has gone away. For some reason meteor was installing 4.0.3 instead of the latest 4.0.4 automatically. When I tried bumping it manually in the version file, it complained of a potentially incompatible upgrade. Feel free to close this issue if it's resolved by the upgrade to 4.0.4 and I'll figure out my versioning issues...

Lepozepo commented 8 years ago

Yeah, that's strange, 4.0.4 is the way to go, both check and random are required by the package in package.js, that's why I returned check. Check makes the package compatible with the audit-argument-checks package and tries to properly sanitize input.

chmac commented 8 years ago

OK, thanks for confirming. I've had weird issues with meteor's version resolver before, I'm guessing it was something in there that got me the older version.

Thanks for an awesome package btw, and your S3 package, both great contributions to the meteor community.