Skip to content

Commit 9a64224

Browse files
committed
support null in DefinePlugin
1 parent 1e07999 commit 9a64224

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/DefinePlugin.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ DefinePlugin.prototype.apply = function(compiler) {
1919
(function walkDefinitions(definitions, prefix) {
2020
Object.keys(definitions).forEach(function(key) {
2121
var code = definitions[key];
22-
if(typeof code === "object" && !(code instanceof RegExp)) {
22+
if(code && typeof code === "object" && !(code instanceof RegExp)) {
2323
walkDefinitions(code, prefix + key + ".");
2424
applyObjectDefine(prefix + key, code);
2525
return;

0 commit comments

Comments
 (0)