Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.0-beta.2 code generation bug #115

Closed
dimavs opened this issue Mar 19, 2019 · 2 comments
Closed

4.0.0-beta.2 code generation bug #115

dimavs opened this issue Mar 19, 2019 · 2 comments
Assignees
Labels

Comments

@dimavs
Copy link

dimavs commented Mar 19, 2019

It looks like there is a code generation bug. Not sure if it's a compiler bug though, it may be connected with bumping dom-bindings version.

Code:

var compiler = require('@riotjs/compiler')

const { code, map } = compiler.compile('<app-main><app-navbar store={props.store} /></app-main>')
console.log(code)

4.0.0-beta.1 output, attribute evaluated as an object:

      'attributes': [{
        'type': expressionTypes.ATTRIBUTE,
        'name': 'store',

        'evaluate': function(scope) {
          return scope.props.store;
        }
      }],

4.0.0-beta.2 output, attribute evaluated as string:

      'attributes': [{
        'type': expressionTypes.ATTRIBUTE,
        'name': 'store',

        'evaluate': function(scope) {
          return [scope.props.store].join('');
        }
      }],
@GianlucaGuarini
Copy link
Member

good catch thank you

@GianlucaGuarini GianlucaGuarini self-assigned this Mar 20, 2019
GianlucaGuarini added a commit that referenced this issue Mar 23, 2019
@GianlucaGuarini
Copy link
Member

Thank you I have fixed it in @riotjs/compiler@4.0.0-beta.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants