-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Bump deps #278
Bump deps #278
Conversation
lib/file-operations.js
Outdated
@@ -73,12 +73,12 @@ function getModeDiff(fsMode, vinylMode) { | |||
|
|||
function getTimesDiff(fsStat, vinylStat) { | |||
|
|||
var mtime = date(vinylStat.mtime); | |||
var mtime = date(vinylStat.mtime) || null; |
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.
Why did this happen?
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.
Because value-or-function now returns undefined
for invalid input, and the expression below this line is expecting null
: Oddly +null
yields 0
, whereas +undefined
yields NaN
, for some reason.
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.
Maybe we should make them 0 then?
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.
Yeah, that would work. But now that I look at this again, the expressions with +
seem slightly wrong here. Aren't we discounting 0
as a valid date (namely 1970-01-01 00:00:00)? Unlikely to ever come up, I guess, but still.
Anyway, I've amended to 0
for now.
Thanks @erikkemperman 😺 |
@phated Sorry if this redundant, I know you were also visiting deps. Still, the value-or-function upgrade turned out to be slightly quirky so wanted to submit this just in case.