【发布时间】:2017-12-03 03:14:27
【问题描述】:
我正在像这样使用ostrio:cstorage 包(用于测试):
import { check } from 'meteor/check'
import { Meteor } from 'meteor/meteor'
import {Tasks} from './collections.js'
import { ClientStorage, clientStorage } from 'meteor/ostrio:cstorage';
Meteor.methods({
'vote.check'(tipId) {
//check(tipId, String);
// we want to use a date with a 1-day granularity
var startOfDay = new Date;
startOfDay.setHours(0, 0, 0, 0);
console.log("In vote.check:"+tipId);
clientStorage.has('aaaa');
},
但我总是收到“TypeError: Cannot read property 'has' of undefined”——谁能告诉我为什么?我真的不知道。谢谢
【问题讨论】:
标签: javascript meteor