提供调用方法结果的例外 - 流星

时间:2015-06-27 19:42:42

标签: javascript meteor

我的服务器端代码

 Meteor.methods({
  'doCount': function(){
      var x = ProductList.find().count();
      console.log(x);
      return x;
  }
});

和我的客户端代码是

Meteor.call('doCount', function(error, result) {

    console.log("lenght of counters variable is "+counters.length);
    var queryResult = ProductList.find().fetch();
    for(i=0 ; i< result; i++){
        console.log("current Time >>> "+ TimeSync.serverTime();
        console.log("expire Time "+ queryResult[i].expire);
          }

});

虽然Chrome浏览器每次都返回正确的日志。 Firefox以奇怪的方式运行。这是截图

Error showing in Firefox console

我还使用meteor-timesync包进行TimeSync.serverTime()函数调用。

0 个答案:

没有答案