ns without a docstring or declarations was causing NPE

This commit is contained in:
fogus 2011-01-25 12:18:17 -05:00
parent dd65c7ccb2
commit 934a337e30

View file

@ -104,7 +104,7 @@
(defmethod dispatch-form 'ns
[form raw nspace-sym]
(let [[ds r s] (extract-common-docstring form raw nspace-sym)]
(let [ds (when (> (count form) 2) (nth form 2))
(let [[_ _ ds & _] form
ds (when (string? ds) ds)]
[ds
(strip-docstring ds r)