aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stack-core.el7
-rw-r--r--test/tests.el4
2 files changed, 8 insertions, 3 deletions
diff --git a/stack-core.el b/stack-core.el
index be385c3..ef0dc9f 100644
--- a/stack-core.el
+++ b/stack-core.el
@@ -220,8 +220,11 @@ entire response as a complex alist."
nil
(mapcar (lambda (cons-cell)
(when (member (car cons-cell) desired-tree)
- (if (sequencep (cdr cons-cell))
- (stack-core-filter-data ))
+ (if (and (sequencep (cdr cons-cell))
+ (sequencep (elt (cdr cons-cell) 0)))
+ (stack-core-filter-data
+ (cdr cons-cell)
+ (cdr (assoc (car cons-cell) desired-tree))))
cons-cell))
data))))
diff --git a/test/tests.el b/test/tests.el
index 0787705..d8a653b 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -68,7 +68,9 @@
(ert-deftest test-data-filter-3 ()
"Test the meta-convenience function -- vector structure"
(equal
- '(((1 . 2) (2 . 3) (3 . 4)) ((1 . a) (2 . b) (3 . c)) nil ((1 . alpha) (2 . beta)))
+ '(((1 . 2) (2 . 3) (3 . 4))
+ ((1 . a) (2 . b) (3 . c))
+ nil ((1 . alpha) (2 . beta)))
(stack-core-filter-data [((1 . 2) (2 . 3) (3 . 4))
((1 . a) (2 . b) (3 . c) (5 . seven))
((should-not-go))