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

Nested @supports throws when getting debug info #3073

Open
balpha opened this issue May 17, 2017 · 1 comment
Open

Nested @supports throws when getting debug info #3073

balpha opened this issue May 17, 2017 · 1 comment

Comments

@balpha
Copy link
Contributor

balpha commented May 17, 2017

Using 2.7.2 in Chrome:

>>> less.render(".foo { @supports (bar: baz) { margin: 0; } }", {dumpLineNumbers: "all"})
TypeError: Cannot read property 'lineNumber' of undefined at Function.debugInfo.asComment

This happens because the ruleset parsed here doesn't get a .debugInfo attached to it, and this if block gets executed because the ruleset of a nested @supports isn't .root.

(I'm not familiar enough with the code to know what the right fix is here, hence not a PR).

@seven-phases-max
Copy link
Member

seven-phases-max commented May 17, 2017

Adding bug label, though this option is actually deprecated (thus the coresponding code is about to be removed rather than fixed).

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

No branches or pull requests

2 participants