Small refactor of isCached function in cdata.js

This commit is contained in:
Woody 2024-01-07 23:14:24 +01:00
parent 21de9e938a
commit 74a5528f17
No known key found for this signature in database
GPG Key ID: 9872D7F5072789B2

View File

@ -50,10 +50,7 @@ function isCached(file) {
}
const stat = fs.statSync(file);
const cached = cache[file];
if (cached && cached.mtime >= stat.mtimeMs && cached.size == stat.size) {
return true;
}
return false;
return cached && cached.mtime == stat.mtimeMs && cached.size == stat.size;
}
/**