Skip to content

Commit 3e64a87

Browse files
committed
Added a way to support a remove observer when _id is a string
1 parent 8796ef6 commit 3e64a87

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Package.describe({
44
name: 'aldeed:tabular',
55
summary: 'Datatables for large or small datasets in Meteor',
6-
version: '2.1.1',
7-
git: 'https://github.com/aldeed/meteor-tabular.git'
6+
version: '2.1.2',
7+
git: 'https://github.com/Meteor-Community-Packages/meteor-tabular.git'
88
});
99

1010
Npm.depends({

server/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Meteor.publish('tabular_getInfo', function (tableName, selector, sort, skip, lim
170170
removed: function (id) {
171171
//console.log('REMOVED');
172172
// _.findWhere is used to support Mongo ObjectIDs
173-
filteredRecordIds = _.without(filteredRecordIds, _.findWhere(filteredRecordIds, id));
173+
filteredRecordIds = typeof id === "string" ? filteredRecordIds = _.without(filteredRecordIds, id) : filteredRecordIds = _.without(filteredRecordIds, _.findWhere(filteredRecordIds, id));
174174
updateRecords();
175175
}
176176
});

0 commit comments

Comments
 (0)