From 7292aa92d901fc18468cb04100f8e2b1c49c412e Mon Sep 17 00:00:00 2001 From: markwhitfeld Date: Thu, 27 Apr 2023 13:12:10 +0200 Subject: [PATCH] fix: include missed key check --- src/parser.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.coffee b/src/parser.coffee index e58b0bef..a0fe9965 100644 --- a/src/parser.coffee +++ b/src/parser.coffee @@ -188,7 +188,7 @@ class exports.Parser extends events # push a clone so that the node in the children array can receive the #name property while the original obj can do without it objClone = {} for own key of obj - objClone[key] = obj[key] + objClone[key] = obj[key] if isValidKey(key) s[@options.childkey].push objClone delete obj["#name"] # re-check whether we can collapse the node now to just the charkey value