diff --git a/index.js b/index.js index f8b10e7..b9d8594 100644 --- a/index.js +++ b/index.js @@ -142,7 +142,7 @@ File.prototype.inspect = function() { }; File.isVinyl = function(file) { - return file && file._isVinyl === true; + return (file && file._isVinyl === true) || false; }; // Virtual attributes diff --git a/test/File.js b/test/File.js index 04a790d..12c7c4f 100644 --- a/test/File.js +++ b/test/File.js @@ -19,7 +19,7 @@ describe('File', function() { done(); }); it('should return false on a null object', function(done) { - File.isVinyl({}).should.equal(false); + File.isVinyl(null).should.equal(false); done(); }); });