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

Case fall through doesn't work #113

Open
vanBrakel opened this issue Oct 11, 2019 · 1 comment
Open

Case fall through doesn't work #113

vanBrakel opened this issue Oct 11, 2019 · 1 comment

Comments

@vanBrakel
Copy link

Pug's case fall through doesn't seem to work with the plugin.

If I use:

return pug`
    case this.props.active
        when 'a'
        when 'b'
            .myDiv
`

I get the error:

Cannot read property 'nodes' of undefined
    at context.staticBlock.childContext (C:\.....\node_modules\babel-plugin-transform-react-pug\dist\visitors\Case.js:25:65)

But:

return pug`
    case this.props.active
        when 'a'
            .myDiv
        when 'b'
            .myDiv
`

Works fine. So case fall-through is currently not parsed correctly with the plugin.

@pturchik
Copy link

Any updates ?

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

No branches or pull requests

2 participants