readymade-ui/readymade

Error when @State parses attribute in template

Opened this issue · 0 comments

When naming an attribute with - Readymade throws an Error. This doesn't happen whenever an attribute contains a dash, only in certain scenario(s) like below.

    <t-market theme="is--dark"
              background="url('/asset/img/act_w_talk.jpg')"
              background-repeat="no-repeat"
              background-size="100% cover">

^^^ Error happens with background-repeat="no-repeat".

The error originates in the template of a component that uses @State, however state is not being used to set the property.

STACKTRACE

core.js:219 Uncaught TypeError: Cannot read property 'node' of undefined
    at NodeTree.updateNode (core.js:219)
    at NodeTree.update (core.js:279)
    at BoundNode.update (core.js:289)
    at BoundHandler.set (core.js:307)
    at HTMLElement.bindState (core.js:409)
    at HTMLElement.onBind [as bindState] (core.js:414)
    at HTMLElement.bindTemplate (core.js:318)
    at attachShadow (scroll.ts:258)
    at new CustomElement (core.js:518)
    at new HomeComponent (core.js:1381)