javascript - How do you check if a Meteor.Collection is synchronized? -
in application, have object fields meteor.collections, of not yet saved on server. example:
var tables = {}; tables["existent"] = new meteor.collection("existent"); // existent on server tables["nonexistent"] = new meteor.collection(null); // nonexistent on server
i need check if collection exists on server. there other way check that, other attaching flag each collection?
i discovered collections have field, _name
, name passed constructor stored. therefore, if check collection._name
, should return name passed (if initialized one), , null
otherwise.
Comments
Post a Comment