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

Update index.js #94

Closed
wants to merge 1 commit into from
Closed

Update index.js #94

wants to merge 1 commit into from

Conversation

alex-chuev
Copy link

No description provided.

@@ -142,7 +141,7 @@ File.prototype.inspect = function() {
};

File.isVinyl = function(file) {
return (file && file._isVinyl === true) || false;
return Boolean(file && file._isVinyl);
Copy link
Member

Choose a reason for hiding this comment

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

do we even need this? file && file._isVinyl should be enough right

Copy link
Member

Choose a reason for hiding this comment

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

In old versions of vinyl, that property doesn't exist. We should be casting with !! though.

Copy link
Member

Choose a reason for hiding this comment

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

This check was actually changed rather recently and I don't see a reason to change it. Also, if someone set their own _isVinyl = 'foo' the above change would report true when it should report false.

@phated
Copy link
Member

phated commented Jul 28, 2016

These changes are overly pedantic so I'm going to close this. However, they made me notice an issue with history that I will create a new issue about.

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.

None yet

3 participants