Skip to content

Commit 1444438

Browse files
committed
handle cases where the selected art is from a set, rather than just a singleton piece
1 parent 2b5a336 commit 1444438

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cljs/nr/gameboard/board.cljs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@
5959
"stock")
6060
card (if (or (:face card) (:images card)) card (get @all-cards (get-title card)))
6161
images (image-or-face card)]
62-
(get-image-path images (keyword lang) (keyword res) (keyword art))))
62+
(if (sequential? art)
63+
(let [art-urls (get-image-path images (keyword lang) (keyword res) (keyword (first art)))
64+
chosen-art (nth art-urls (second art))]
65+
[chosen-art])
66+
(get-image-path images (keyword lang) (keyword res) (keyword art)))))
6367

6468

6569
(defonce button-channel (chan))

0 commit comments

Comments
 (0)