PWV-1: Preventing dropping on Servers and CustomServers Mongo Collections
This commit is contained in:
parent
3c363050f6
commit
481bf30a14
@ -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({});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user