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

Broken prop reference with operator #98

Open
knilink opened this issue Jun 18, 2019 · 1 comment
Open

Broken prop reference with operator #98

knilink opened this issue Jun 18, 2019 · 1 comment

Comments

@knilink
Copy link

knilink commented Jun 18, 2019

input

.foo
  width: 1px
  height: -@width

expected:

.foo {
  width: 1px;
  height: -1px;
}

actual:

TypeError: Cannot read property 'map' of undefined
@knilink knilink changed the title Boken prop reference with operator Broken prop reference with operator Jun 18, 2019
@knilink
Copy link
Author

knilink commented Jun 18, 2019

maybe this line

return `${OPEARTION_MAP[op] || op}(${visitExpression(expr)})`

should be

return `${OPEARTION_MAP[op] || op}(${visitNode(expr)})`

or check undefined in visitExpression

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

1 participant