diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-09 13:15:27 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-09 13:15:27 +0200 |
commit | 4b83c63958a67a7ad8cf6e3214e4bac825d2d98f (patch) | |
tree | cdb8a85980ad3ff154515448b58c8a7067fa9570 | |
parent | Handle crashes in tests! (diff) | |
download | calp-4b83c63958a67a7ad8cf6e3214e4bac825d2d98f.tar.gz calp-4b83c63958a67a7ad8cf6e3214e4bac825d2d98f.tar.xz |
Fix `prop` for multi-valued items.
-rw-r--r-- | module/vcomponent/base.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/vcomponent/base.scm b/module/vcomponent/base.scm index ff2382bf..10f77606 100644 --- a/module/vcomponent/base.scm +++ b/module/vcomponent/base.scm @@ -107,7 +107,11 @@ ;; (define prop (compose-lens vline-value prop*)) (define prop (case-lambda - ((comp key) (and=> (prop* comp key) vline-value)) + ((comp key) (and=> (prop* comp key) + (lambda (x) + (if (list? x) + (map vline-value x) + (vline-value x))))) ((comp k v) (cond ((prop* comp k) => (lambda (vline) |