projects
/
mkdru-moved-to-drupal.org.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44ebb26
)
Avoid empty arrays when splitting
author
Jakub Skoczen
<jakub@indexdata.dk>
Thu, 3 Mar 2011 09:30:50 +0000
(10:30 +0100)
committer
Jakub Skoczen
<jakub@indexdata.dk>
Mon, 7 Mar 2011 09:45:45 +0000
(10:45 +0100)
mkdru.client.js
patch
|
blob
|
history
diff --git
a/mkdru.client.js
b/mkdru.client.js
index
ddda649
..
0044663
100644
(file)
--- a/
mkdru.client.js
+++ b/
mkdru.client.js
@@
-145,8
+145,9
@@
mkdru.pz2Term = function (data) {
// map all facets against selected, for simple rendering
var hash = $.deparam.fragment();
for (var key in hash) {
- if (key.indexOf('limit') == 0) //always wrap in array
- hash[key.substr(6)] = hash[key].split(';');
+ if (key.indexOf('limit') == 0 && hash[key])
+ //always wrap in array
+ hash[key.substr(6)] = hash[key].split(/;+/);
delete hash[key];
}
for (var facet in mkdru.facets) {