Skip to content
Browse files

Expect multiple ids list in (id,id) format

  • Loading branch information...
1 parent f5d24da commit 5bb4208ed4b00af7f24e1cd77753d1798b59bfac @kriszyp kriszyp committed Jan 19, 2010
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/facet.js
View
7 lib/facet.js
@@ -107,9 +107,12 @@ function FacetedStore(store, facetClass){
}
return value;
}
- if(id.indexOf(',') > -1){
+ if(id.match(/^\(.*\)$/)){
// handle comma separated ids
- var parts = id.split(',');
+ if(id.length == 2){ // empty array
+ return [];
+ }
+ var parts = id.substring(1, id.length -1).split(',');
return parts.map(function(part){
return constructor.get(part);
});

0 comments on commit 5bb4208

Please sign in to comment.
Something went wrong with that request. Please try again.