瀏覽代碼

Use OR to guard instead of IF.

Brit Butler 11 年之前
父節點
當前提交
387e47bde6
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/posts.lisp

+ 1 - 3
src/posts.lisp

@@ -13,9 +13,7 @@
13 13
       (setf (content-slug object) (slugify title)
14 14
             format (make-keyword (string-upcase format))
15 15
             text (render-content text format)
16
-            author (if author
17
-                       author
18
-                       (author *config*)))))
16
+            author (or author (author *config*)))))
19 17
 
20 18
 (defmethod render ((object post) &key prev next)
21 19
   (funcall (theme-fn 'post) (list :config *config*