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

push-operator-into-assignment error #3

Closed
franck-paul opened this issue Oct 25, 2021 · 2 comments
Closed

push-operator-into-assignment error #3

franck-paul opened this issue Oct 25, 2021 · 2 comments

Comments

@franck-paul
Copy link

I got this message “Can push + operator into += assignment.” for this line of code:

content = excerpt + content;

The proposed replacement is (which is marked as safe):

content += excerpt;

Which is not the same as I which to put excerpt before content in resulting content variable.

@lgrammel
Copy link
Contributor

Thanks for the bug report. You are right, this is incorrect for string & template literals. I'll put out a fix.

@lgrammel
Copy link
Contributor

@franck-paul I just released version 1.46.4, which fixes the bug. Please re-open this issue if you still encounter the bug in 1.46.4 or higher. Thanks again for the bug report!

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