diff options
author | portix <portix@gmx.net> | 2012-11-22 17:19:04 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-11-22 17:19:04 +0100 |
commit | e863f00d4f292b9dea57534281a5d0830b34b563 (patch) | |
tree | 4689334093d91fbda31635eedd5e9dd1714dbf07 /scripts | |
parent | b5df95d93b058d909a75497cede97e11631564a9 (diff) | |
download | dwb-e863f00d4f292b9dea57534281a5d0830b34b563.zip |
Delete module if second argument is omitted in replace
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/dwb.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/lib/dwb.js b/scripts/lib/dwb.js index 79cf8594..d81a49b9 100644 --- a/scripts/lib/dwb.js +++ b/scripts/lib/dwb.js @@ -37,7 +37,14 @@ }, "replace" : { value : function(name, module) { - _modules[name] = module; + if (! module && _modules[name] ) { + for (var key in _modules[name]) { + delete _modules[name][key]; + } + delete _modules[name]; + } + else + _modules[name] = module; } }, "require" : { |