From 8b8263dae71629e312c3e51888c893bd1bba362d Mon Sep 17 00:00:00 2001 From: eblondel Date: Mon, 26 Sep 2022 23:26:29 +0200 Subject: [PATCH] fix #197 --- R/GMLElement.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/GMLElement.R b/R/GMLElement.R index c8189064..fd7c0837 100644 --- a/R/GMLElement.R +++ b/R/GMLElement.R @@ -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