-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix(utils): handle serializeFunction edge case #5754
Conversation
Resolves edge cases where functions are serialized with a prefix of `function function`
Codecov Report
@@ Coverage Diff @@
## dev #5754 +/- ##
=====================================
Coverage 95.6% 95.6%
=====================================
Files 82 82
Lines 2662 2662
Branches 683 683
=====================================
Hits 2545 2545
Misses 98 98
Partials 19 19
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @pi0
@aaronransley just please check this against 2.7.1 as I have a suspicion this may have been solved already. cc @pi0 |
@aaronransley k, cool, let's get this in then @pi0 I'll take a stab at rewriting serializeFunction using acorn to prevent further problems. |
Resolves #5001 and cases where functions are serialized with a prefix of
function function
Types of changes
Description
This is a naive attempt at resolving #5001
I am not certain how to resolve the root issue with the function parsing code; the current code in serialize.js strikes me as requiring specific knowledge of how it was built. @galvez Perhaps you have ideas for a better fix?
Otherwise, I'm hopeful that this PR is helpful!
Checklist: