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

Properly exit calc mode after use #3493

Merged
merged 1 commit into from
Apr 28, 2020
Merged

Conversation

rgroothuijsen
Copy link
Contributor

In issue #3393, it was found that Less does not properly exit out of calc mode after using it. This causes subsequent variables to be incorrectly evaluated, which results in errors. The code checks if the calculation stack is empty by checking !this.calcStack, but this does not evaluate to false. This was changed to checking if this.calcStack.length is 0, which does evaluate to false.

Note: The changes introduced by this PR also caused changes in the sourcemap test output, which is why I modified that as well. I'm not sure if this is right or wrong.

@matthew-dean matthew-dean merged commit 2634494 into less:master Apr 28, 2020
@matthew-dean
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants