about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMorgan Astra <m@morganastra.me>2016-08-07 03:55:53 -0700
committerMorgan Astra <m@morganastra.me>2016-08-07 03:55:53 -0700
commit1afca666f4f231fb912bd7804dcdf8682e817dab (patch)
tree80e5f44ae6f20ef096ebdb3b47f8451566505784 /src
parent3c2bf7a8f8f0c76cfb7e2b57b244764e0482421c (diff)
fix error with single pronoun set
Diffstat (limited to 'src')
-rw-r--r--src/pronouns/pages.clj18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj
index 9c42a0a..f73a12e 100644
--- a/src/pronouns/pages.clj
+++ b/src/pronouns/pages.clj
@@ -75,7 +75,7 @@
 
 
 (defn format-pronoun-examples
-  [pronoun-declension alternates]
+  [pronoun-declensions]
   (let [title "Pronoun Island: English Language Examples"]
     (html
      [:html
@@ -85,8 +85,7 @@
        [:link {:rel "stylesheet" :href "/pronouns.css"}]]
       [:body
        (title-block title)
-       (apply examples-block pronoun-declension)
-       (map #(apply examples-block %) alternates)
+       (map #(apply examples-block %) pronoun-declensions)
        (about-block)
        (contact-block)]])))
 
@@ -127,12 +126,11 @@
 
 (defn pronouns [params pronouns-table]
   (let [path (params :*)
-        ors (u/vec-coerce (params "or"))
-        pronoun-declension (lookup-pronouns (escape-html path)
-                                            pronouns-table)
-        alternates (map #(lookup-pronouns (escape-html %)
+        alts (or (params "or") [])
+        pronouns (concat [path] (u/vec-coerce alts))
+        pronoun-declensions (map #(lookup-pronouns (escape-html %)
                                           pronouns-table)
-                        ors)]
-    (if pronoun-declension
-      (format-pronoun-examples pronoun-declension alternates)
+                        pronouns)]
+    (if pronoun-declensions
+      (format-pronoun-examples pronoun-declensions)
       (not-found))))