Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor方法等待的订阅不是';不在那里_Meteor_Meteor Methods_Kadira - Fatal编程技术网

Meteor方法等待的订阅不是';不在那里

Meteor方法等待的订阅不是';不在那里,meteor,meteor-methods,kadira,Meteor,Meteor Methods,Kadira,我有一个Meteor方法generateUserHash,它只传递一个ID以获取用户哈希: export const generateUserHash = new ValidatedMethod({ name: 'generateUserHash', validate() {}, run() { if (!Meteor.isServer) return; if (!this.userId) throw new Meteor.Error('no-user-id')

我有一个Meteor方法
generateUserHash
,它只传递一个ID以获取用户哈希:

export const generateUserHash = new ValidatedMethod({
  name: 'generateUserHash',

  validate() {},

  run() {
    if (!Meteor.isServer) return;

    if (!this.userId) throw new Meteor.Error('no-user-id');

    return SecureMode.userHash({
      identifier: this.userId,
      secretKey: Meteor.settings.intercom.secretKey,
    });
  },
});
据卡迪拉说:


我不明白为什么它在等待所有这些订阅,而这些订阅不在方法中。

一个方法将等待订阅,即使订阅不在该方法中


这里有一个关于等待时间的好帖子:

方法将等待订阅,即使订阅不在该方法中


这里有一个关于等待时间的好帖子:

什么时候执行这个方法?当应用程序刚完成加载或按需执行用户操作时?它在安装React组件时运行。您何时执行此方法?当应用程序刚完成加载或按需执行用户操作时?它会在安装React组件时运行。链接已断开。有一个web存档链接:该链接已失效。有web存档链接: