From e793c9d948f13eb0a95a1512dd4de8a0c787eebe Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 29 Oct 2013 17:14:16 -0700 Subject: [PATCH] Remove unnecessary check. This removed check will never be false as we pass the oplog selector that looks for 'o.drop' and we assume that you can get only one command per oplog record. --- packages/mongo-livedata/oplog.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/mongo-livedata/oplog.js b/packages/mongo-livedata/oplog.js index 163e01590b..566bff264d 100644 --- a/packages/mongo-livedata/oplog.js +++ b/packages/mongo-livedata/oplog.js @@ -196,12 +196,9 @@ MongoConnection.prototype._observeChangesWithOplog = function ( var oplogEntryHandle = self._oplogHandle.onOplogEntry( cursorDescription.collectionName, function (op) { if (op.op === 'c') { - // If it is not db.collection.drop(), ignore it - if (op.o && _.isEqual(_.keys(op.o), ['drop'])) { - published.each(function (fields, id) { - remove(id); - }); - } + published.each(function (fields, id) { + remove(id); + }); } else { // All other operators should be handled depending on phase oplogEntryHandlers[phase](op);