Skip to content

Make images smaller using best-in-class codecs, right in the browser.

JavaScript

`Object.keys().forEach()` --> `for..of`

Jason Millere501ffff85e5
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();
});
}