Simplify PAGE-URL's around method.

This commit is contained in:
Brit Butler 2014-05-28 11:50:44 -04:00
parent 70427b81d0
commit 669655930b

View file

@ -35,10 +35,9 @@
(error "No routing method found for: ~A" class-name)))))
(defmethod page-url :around ((document t))
(let ((result (call-next-method)))
(if (pathname-type result)
(make-pathname :defaults result)
(make-pathname :type "html" :defaults result))))
(let* ((result (call-next-method))
(type (or (pathname-type result) "html")))
(make-pathname :type type :defaults result)))
(defgeneric render (document &key &allow-other-keys)
(:documentation "Render the given DOCUMENT to HTML."))