antonmedv / monkberry

Monkberry is a JavaScript library for building web user interfaces
https://monkberry.js.org
MIT License
1.49k stars 78 forks source link

Cannot read property 'type' of null SVG #46

Closed binjospookie closed 7 years ago

binjospookie commented 7 years ago

I have it in my monk-template:

<svg aria-hidden="true">
   <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="./images/star.svg#main"></use>
</svg>

When I try to build it I have an error:

(Emitted value instead of an instance of Error) Cannot read property 'type' of null

which is firing by this string

 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="./images/star.svg#main"></use>
binjospookie commented 7 years ago
{% unsafe '<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="./images/star.svg#main"></use>' %}

works for me :)

antonmedv commented 7 years ago

Leave only this attrs:

<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">...</svg>