micktaiwan/meteor-vermongo

update() gets stuck on TypeError

Closed this issue · 1 comments

Hi,

I want to use Vermongo in Meteor and tried out your package, but following the Usage guide (HTML is run on Client only) I got stuck on the following error when running the app:

Uncaught TypeError: fieldNames.diff is not a function(anonymous function) @ vermongo.js:49(anonymous function) @ update.js:42_.each..forEach @ underscore.js:105(anonymous function) @ update.js:41.each..forEach @ underscore.js:105(anonymous function) @ update.js:40CollectionHooks.extendCollectionInstance..each.collection.(anonymous function) @ collection-hooks.js:103(anonymous function) @ VM78234:2InjectedScript._evaluateOn @ VM78075:883InjectedScript._evaluateAndWrap @ VM78075:816InjectedScript.evaluate @ VM78075:682

This is caused by Requirements.update({_id: id}, {$set:{title: "updated with new value !"}}); and seems to be related to a recent commit 0e9ebfa of yours. Do you know how to fix this? If I comment out the update command the tutorial appears to run fine.

Thanks in advance,

I was using a function declared in my project, not in the package...
You can update to the last version 1.0.1.