Skip to content

Commit

Permalink
fix #197
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Sep 26, 2022
1 parent 6d43402 commit 8b8263d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/GMLElement.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ GMLElement <- R6Class("GMLElement",
childName <- names(children)[i]
childElem <- GMLElement$new(element = childName)
childElem$decode(xml = childXML)
if(is(self[[childName]], "list")){
if(is(self[[childName]], "list") | !is.null(self[[childName]])){
self[[childName]] <- c(self[[childName]], childElem)
}else{
self[[childName]] <- childElem
Expand Down

0 comments on commit 8b8263d

Please sign in to comment.