From 74a5528f17bd671c4ffb0d5ed03d1f9b7dbe0f05 Mon Sep 17 00:00:00 2001 From: Woody Date: Sun, 7 Jan 2024 23:14:24 +0100 Subject: [PATCH] Small refactor of isCached function in cdata.js --- tools/cdata.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/cdata.js b/tools/cdata.js index a73e2fa3f..5d9965634 100644 --- a/tools/cdata.js +++ b/tools/cdata.js @@ -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; } /**