From e501ffff85e5a73507b924252b10cd3ff75f53dc Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Tue, 27 Mar 2018 20:47:38 -0400 Subject: [PATCH] `Object.keys().forEach()` --> `for..of` --- config/watch-timestamps-plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/watch-timestamps-plugin.js b/config/watch-timestamps-plugin.js index ff163598..6db23a03 100644 --- a/config/watch-timestamps-plugin.js +++ b/config/watch-timestamps-plugin.js @@ -17,13 +17,13 @@ module.exports = class WatchTimestampsPlugin { const patterns = this.patterns; const timestamps = watch.fileTimestamps; - Object.keys(timestamps).forEach(filepath => { + for (const filepath of timestamps) { if (patterns.some(pat => pat instanceof RegExp ? pat.test(filepath) : filepath.indexOf(pat) === 0)) { let time = fs.statSync(filepath).mtime; if (timestamps instanceof Map) timestamps.set(filepath, time); else timestamps[filepath] = time; } - }); + } callback(); }); }