PWV-1: Preventing dropping on Servers and CustomServers Mongo Collections
This commit is contained in:
1 parent
3c363050f6
commit
481bf30a14
1 file changed
+5
-3
@@ -5,8 +5,10 @@ Meteor.startup(function() {
|
||||
for (var property in global) {
|
||||
var object = global[property];
|
||||
if (object instanceof Meteor.Collection) {
|
||||
console.warn('Dropping: ' + object._debugName);
|
||||
object.remove({});
|
||||
if (!(/^server|currentServer$/).test(object._name)) {
|
||||
console.warn('Dropping: ' + object._debugName);
|
||||
object.remove({});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user