Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Get root to be cloned, via root() instead of children

  • Loading branch information...
commit 2587fc5dff3185a4b47768e6dee07178254017b4 1 parent 1e79c35
@piroor piroor authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/XMLFragment.coffee
View
5 src/XMLFragment.coffee
@@ -268,9 +268,8 @@ class XMLFragment
# Imports cloned root from another XMLBuilder
importXMLBuilder: (xmlbuilder) ->
- root = xmlbuilder.children[xmlbuilder.children.length - 1]
- clonedRoot = root.clone(true)
- clonedRoot.parent = this
+ clonedRoot = xmlbuilder.root().clone(true)
+ clonedRoot.parent = @
@children.push clonedRoot
clonedRoot.isRoot = false
return @
Please sign in to comment.
Something went wrong with that request. Please try again.