Skip to content

Commit ad492ff

Browse files
gavinaikensindresorhus
authored andcommitted
Fix compareLastModifiedTime for Gulp 4 (#78)
1 parent 8c05ae6 commit ad492ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async function compareLastModifiedTime(stream, sourceFile, targetPath) {
2525
// TODO: Use the `stat` `bigint` option when targeting Node.js 10 and Gulp supports it
2626
const targetStat = await stat(targetPath);
2727

28-
if (sourceFile.stat && sourceFile.stat.mtimeMs > targetStat.mtimeMs) {
28+
if (sourceFile.stat && Math.floor(sourceFile.stat.mtimeMs) > Math.floor(targetStat.mtimeMs)) {
2929
stream.push(sourceFile);
3030
}
3131
}

0 commit comments

Comments
 (0)