diff --git a/src/iri-parser.lisp b/src/iri-parser.lisp index 812b715..056353a 100644 --- a/src/iri-parser.lisp +++ b/src/iri-parser.lisp @@ -353,7 +353,9 @@ (format string-stream "?~a" query)) (when fragment (format string-stream "#~a" fragment)))))) - (write-string (render) stream))) + (if stream + (write-string (render) stream) + (render)))) (defmethod to-s ((object iri) &key &allow-other-keys) (with-output-to-string (stream)