Skip to content

Commit f14b99b

Browse files
author
Conor Hunt
committed
fix: check that frozen.build exists before trying to access it
If there is a compilation where frozen.build is not generated for some reason, then the check here would fail and throw an exception: Could not freeze FILE_NAME: Cannot read property 'hash' of undefined We check to see if the build exists and then fall through to regenerate if it does not.
1 parent aa0383b commit f14b99b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/TransformNormalModulePlugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ class TransformNormalModulePlugin {
598598
module.request &&
599599
(cacheable(module) || !module.built) &&
600600
module instanceof NormalModule &&
601-
(!frozen ||
601+
(!frozen || !frozen.build ||
602602
(schema >= 4 && module.hash !== frozen.build.hash) ||
603603
(schema < 4 &&
604604
module.getHashDigest(extra.compilation.dependencyTemplates) !==

0 commit comments

Comments
 (0)