From e774ef34ac7de7badf83f8560cca13861e76f23c Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Mon, 13 Aug 2018 17:21:56 -0400 Subject: [PATCH] fix: return value from updateMd5CacheItem Return a value so that a second call to updateMd5CacheItem on the stored promise is given the input the first call received to keep from throwing an error. --- lib/CacheMd5.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/CacheMd5.js b/lib/CacheMd5.js index b1ace2cb..f31e8495 100644 --- a/lib/CacheMd5.js +++ b/lib/CacheMd5.js @@ -382,6 +382,11 @@ class Md5Cache { md5Cache[file] = value; cachedMd5s[file] = value.hash; } + + // If somehow dependencies operates on a file in both file and + // context, or otherwise doubles up, return value so the second + // call receives input. + return value; } const building = buildingMd5s[file];