Tejas Manohar
Tejas Manohar

Reputation: 974

Undefined is not a function - MeteorJS

I keep getting undefined is not a function for the line below

Institutions.insert({$set: {admin: Meteor.userId(), title: inst_name, type: inst_type, school: inst_school, description: inst_desc}, $push: {members: Meteor.userID()}});

Here's the full snippet in context. Would someone explain how to correct this error and what's causing it?

https://bpaste.net/show/f1e1c993cc0b

Upvotes: 0

Views: 46

Answers (1)

Tejas Manohar
Tejas Manohar

Reputation: 974

Silly mistake -- Meteor.userID() needs to be changed to Meteor.userId()

Upvotes: 1

Related Questions