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

Convert ES6 arrow syntax to ES5 for compatibility #3511

Merged
merged 1 commit into from
Feb 18, 2020
Merged

Convert ES6 arrow syntax to ES5 for compatibility #3511

merged 1 commit into from
Feb 18, 2020

Conversation

pelargir
Copy link
Contributor

@pelargir pelargir commented Feb 11, 2020

Description

ES6 arrow syntax was introduced in #3316 . This PR changes it back to ES5 syntax which obviates the need to put Uglifier into harmony mode just to run Solidus. See also #3480.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. The failing spec seems to be related.
I would try to add .bind(this) to the function body.

This obviates the need to put Uglifier in harmony mode.
@pelargir
Copy link
Contributor Author

pelargir commented Feb 18, 2020

Specs are now passing after the fix suggested by @tvdeyen

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very much appreciated! Thanks 🍨

@tvdeyen tvdeyen merged commit 29f7aac into solidusio:master Feb 18, 2020
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.

3 participants