andreasplesch / x_ite_dom

link x_ite to the DOM
http://andreasplesch.github.io/x_ite_dom/index.xhtml
MIT License
6 stars 0 forks source link

Inline.dom could be undefined. #34

Closed create3000 closed 5 years ago

create3000 commented 5 years ago

In the function appendInlineDOM the property node.dom could be undefined and will cause an exception: https://github.com/andreasplesch/x_ite_dom/blob/332b41c7c623c447cd054d61f747f42fb4ad56d8/src/x_ite_dom.js#L333 TypeError: node.dom is undefined; when the Inline cannot load the url given, for instance the url field is empty or when the url is wrong.

There should be a check if the .dom property exists.

andreasplesch commented 5 years ago

That makes sense, I can add a check.

~~I am curious in what situations there may not be .dom property ? Should the property not be added in the parser ? Perhaps an example would help to better understand.~~

andreasplesch commented 5 years ago

added check here with be6f30b5916875443b0d48ae3cee1e8115cf8222 and updated to version 1.2

create3000 commented 5 years ago

Can confirm the change, it works now.

andreasplesch commented 5 years ago

Thanks.