-
Notifications
You must be signed in to change notification settings - Fork 196
use only alias field properties #340
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
Conversation
prevent checking object prototype properties
Codecov Report
@@ Coverage Diff @@
## main #340 +/- ##
==========================================
- Coverage 95.06% 95.05% -0.01%
==========================================
Files 39 39
Lines 1620 1618 -2
==========================================
- Hits 1540 1538 -2
Misses 80 80
Continue to review full report at Codecov.
|
it exports/imports field we using enumerable keys only, so it should be safe |
lib/AliasFieldPlugin.js
Outdated
: Object.prototype.hasOwnProperty.call( | ||
fieldData, | ||
innerRequest.replace(/^\.\//, "") | ||
) |
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.
: Object.prototype.hasOwnProperty.call( | |
fieldData, | |
innerRequest.replace(/^\.\//, "") | |
) | |
: innerRequest.startsWith("./") && Object.prototype.hasOwnProperty.call( | |
fieldData, | |
innerRequest.slice(2) | |
) |
Thanks |
prevent checking object prototype properties
fixes #118