corenova / yang-js

YANG parser and composer
Apache License 2.0
56 stars 18 forks source link

List does not have ListItem as its children #80

Closed quantang closed 5 years ago

quantang commented 5 years ago

I cannot get the children from a List Property, which I suppose to be an array of ListItem Property. Currently, it returns an empty array.

>‌‌node.children[0]
‌<Property
>‌‌node.children[0].children
‌<Array(0)

‌‌>node.children[1]
<‌Container
>‌‌node.children[1].children
‌<Array(1)

‌‌>node.children[2]
‌<List
‌‌>node.children[2].children
‌<Array(0)  // there should be ListItem array returned here, I guess

Cheers.

quantang commented 5 years ago

Hi @saintkepha I can try to fix this one if you don't mind. :P

sekur commented 5 years ago

Thanks for the commit! BTW, do you have an email address? I'd like to add you to the project contributors/authors file if you're ok with it.

sekur commented 5 years ago

You can send me your email to peter@corenova.com