Skip to content

Commit

Permalink
Remove unused modules line, normalize timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
tbranyen committed Jun 3, 2017
1 parent 8972480 commit 758a0f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ LiveReloadPlugin.prototype.start = function start(watching, cb) {
};

LiveReloadPlugin.prototype.done = function done(stats) {
this.changedFiles = Object.keys(stats.compilation.fileTimestamps).filter(function(watchfile) {
var timestamps = stats && stats.compilation && stats.compilation.fileTimestamps || {};

this.changedFiles = Object.keys(timestamps).filter(function(watchfile) {
return this.startTime < Math.ceil(statSync(watchfile).mtime);
}.bind(this));

Expand Down Expand Up @@ -84,7 +86,6 @@ LiveReloadPlugin.prototype.done = function done(stats) {
}, this);
}, this);

var modules = stats.compilation.modules.find(child => child.reason);
var hash = stats.compilation.hash;
var childHashes = (stats.compilation.children || []).map(child => child.hash);
var updated = include.filter(function(file) {
Expand Down

0 comments on commit 758a0f6

Please sign in to comment.