服务器是完全设置但在客户端代码
let query = new Parse.Query(‘Notification‘);
let subscription = query.subscribe();
subscription.on(‘open‘, () => {
console.log(‘subscription opened‘);
});
抛出错误: 未捕获TypeError:无法读取属性“onNext”定义的订阅。 第3894行
第3894行
key: ‘pushData‘,
value: function pushData() {
var results = this.resultSet;
// Fetch a subset of results if the query has a limit
if (this.originalQuery._limit > -1) {
results = results.slice(0, this.originalQuery._limit);
}
var resultSet = results.map(extractId);
var data = ObjectStore.getDataForIds(resultSet);
if (this.originalQuery._observeOne) {
data = data[0];
}
this._forEachSubscriber(function (subscriber) {
return subscriber.onNext(data);
});
任何帮助将不胜感激!
原文地址:http://blog.51cto.com/14021402/2303884
时间: 2024-10-10 09:10:12