Skip to content

Commit 6c1e98f

Browse files
committed
Fixed Hash Cycle
1 parent 80b667f commit 6c1e98f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎lib/HotModuleReplacementPlugin.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ HotModuleReplacementPlugin.prototype.apply = function(compiler) {
5252
compilation.plugin("after-hash", function() {
5353
var records = this.records;
5454
if(!records) return;
55-
if(!records.hash) return;
56-
var preHash = records.preHash;
57-
if(!preHash) preHash = "x";
55+
var lastHash = records.hash || "x";
56+
var preHash = records.preHash || "x";
57+
var prepreHash = records.prepreHash || "x";
5858
if(preHash === this.hash) {
59-
this.modifyHash(records.prepreHash);
59+
this.modifyHash(prepreHash);
6060
return;
6161
}
6262
records.prepreHash = records.hash || "x";

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webpack",
3-
"version": "0.11.0-beta11",
3+
"version": "0.11.0-beta12",
44
"author": "Tobias Koppers @sokra",
55
"description": "Packs CommonJs/AMD/Labeled Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.",
66
"dependencies": {

‎test/HotModuleReplacementPlugin.test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe("HotModuleReplacementPlugin", function() {
99
var entryFile = path.join(__dirname, "js", "entry.js");
1010
var recordsFile = path.join(__dirname, "js", "records.json");
1111
try { fs.mkdirSync(path.join(__dirname, "js")); } catch(e) {}
12-
try { fs.unlinkFileSync(recordsFile); } catch(e) {}
12+
try { fs.unlinkSync(recordsFile); } catch(e) {}
1313
var compiler = webpack({
1414
entry: entryFile,
1515
recordsPath: recordsFile,

0 commit comments

Comments
 (0)