【问题标题】:Undefined is not a function - MeteorJS未定义不是一个函数 - MeteorJS
【发布时间】:2014-09-10 06:54:19
【问题描述】:

我不断得到 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()}});

这是上下文中的完整 sn-p。有人能解释一下如何纠正这个错误以及导致它的原因吗?

https://bpaste.net/show/f1e1c993cc0b

【问题讨论】:

  • Meteor.userId()替换Meteor.userID()?
  • 哦,愚蠢的错误。 @DavidWelon 你会聊天请求吗?遇到麻烦,也被拒绝访问。无法将完整代码放在这里,因为它是私有的。

标签: javascript meteor meteorite


【解决方案1】:

愚蠢的错误——Meteor.userID() 需要更改为 Meteor.userId()

【讨论】:

    猜你喜欢
    • 2020-09-11
    • 2015-03-16
    • 2015-03-02
    • 1970-01-01
    • 1970-01-01
    • 2021-07-19
    • 1970-01-01
    • 1970-01-01
    • 2018-01-14
    相关资源
    最近更新 更多