Merge pull request #440 from metamaps/feature/fix.fork.filter.bug
fix filter bug
This commit is contained in:
commit
3b89a2a13f
1 changed files with 28 additions and 20 deletions
|
@ -3301,24 +3301,32 @@ Metamaps.Filter = {
|
|||
// ['Topics', 'Synapses'] as 'collection'
|
||||
if (typeof collection === "object") {
|
||||
Metamaps[collection[0]].each(function(model) {
|
||||
var prop = model.get(propertyToCheck) ? model.get(propertyToCheck).toString() : false;
|
||||
if (prop && newList.indexOf(prop) === -1) {
|
||||
var prop = model.get(propertyToCheck);
|
||||
if (prop !== null) {
|
||||
prop = prop.toString();
|
||||
if (newList.indexOf(prop) === -1) {
|
||||
newList.push(prop);
|
||||
}
|
||||
}
|
||||
});
|
||||
Metamaps[collection[1]].each(function(model) {
|
||||
var prop = model.get(propertyToCheck) ? model.get(propertyToCheck).toString() : false;
|
||||
if (prop && newList.indexOf(prop) === -1) {
|
||||
var prop = model.get(propertyToCheck);
|
||||
if (prop !== null) {
|
||||
prop = prop.toString();
|
||||
if (newList.indexOf(prop) === -1) {
|
||||
newList.push(prop);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (typeof collection === "string") {
|
||||
} else if (typeof collection === "string") {
|
||||
Metamaps[collection].each(function(model) {
|
||||
var prop = model.get(propertyToCheck) ? model.get(propertyToCheck).toString() : false;
|
||||
if (prop && newList.indexOf(prop) === -1) {
|
||||
var prop = model.get(propertyToCheck);
|
||||
if (prop !== null) {
|
||||
prop = prop.toString();
|
||||
if (newList.indexOf(prop) === -1) {
|
||||
newList.push(prop);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue