-
Notifications
You must be signed in to change notification settings - Fork 7.3k
lib/path.js: Use '===' instead of '==' for comparison #7554
Conversation
I've started rewriting node modules to practice typing and noticed that you're evaluating this `if (samePartsLength == 0) {` condition without type-checking. I thought I might submit a quick pull request to fix this issue.
Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion. Commit stites/node@eaa529944b68a4516ed9d43e3ff50b071ff759bc has the following error(s):
The following commiters were not found in the CLA:
You can fix all these things without opening another issue. Please see CONTRIBUTING.md for more information |
Read the contributing doc - going to submit this as a new pull request on |
Not sure which branch I should submit this to- the diff on |
Type checking is not necessary, since samePartsLength is the minimum between two array lengths. I see a bigger problem with the implementation of the trim function, both in the windows and posix code path, that looks pretty broken. |
Basic change looks good but PR is out of date and the change is a lower priority. Flagging it to get back to but marking as a low priority |
Closing this here. New PR opened nodejs/node#2388 |
Per: nodejs/node-v0.x-archive#7554 Originally submitted by @stites
Per: nodejs/node-v0.x-archive#7554 Originally submitted by @stites PR-URL: #2388 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Per: nodejs/node-v0.x-archive#7554 Originally submitted by @stites PR-URL: nodejs#2388 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
path: Use '===' instead of '==' for comparison
I've started rewriting node modules to practice typing and noticed that
you're evaluating this
if (samePartsLength == 0) {
condition withouttype-checking. I thought I might submit a quick pull request to fix
this issue.