]> gitweb.factorcode.org Git - factor.git/commitdiff
webapps.help: set search and empty when not provided
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 20 Jan 2022 18:13:55 +0000 (10:13 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 20 Jan 2022 18:13:55 +0000 (10:13 -0800)
extra/webapps/help/help.factor

index 177386fd147234c072c7998a39cd15ddf699005c..d6f46f31669b255502878df5c446d273466aeb99 100644 (file)
@@ -19,14 +19,14 @@ TUPLE: help-webapp < dispatcher ;
     <page-action>
         { help-webapp "search" } >>template
         [
-            "search" param [ unicode:blank? ] trim [
-                dup "search" set-value
-                f swap help-dir [
+            f "search" param [ unicode:blank? ] trim
+            dup "search" set-value [
+                help-dir [
                     [ article-apropos ?links "articles" set-value ]
                     [ word-apropos ?links "words" set-value ]
                     [ vocab-apropos ?links "vocabs" set-value ] tri
-                ] with-directory not "empty" set-value
-            ] unless-empty
+                ] with-directory
+            ] unless-empty not "empty" set-value
             help-navbar "navbar" set-value
 
             { help-webapp "search" } <chloe-content>