Removed redundant null checking.

This commit is contained in:
Evgeny Gerashchenko
2012-07-31 20:27:41 +04:00
parent 926e01be9c
commit 69313ae3be
+1 -1
View File
@@ -376,7 +376,7 @@ fun Element.createElement(name: String, doc: Document? = null, init: Element.()-
/** Returns the owner document of the element or uses the provided document */
fun Node.ownerDocument(doc: Document? = null): Document {
val answer = if (this != null && this.nodeType == Node.DOCUMENT_NODE) this as Document
val answer = if (this.nodeType == Node.DOCUMENT_NODE) this as Document
else if (doc == null) this.ownerDocument
else doc