kopia lustrzana https://github.com/c9/core
code style
rodzic
cc5860594c
commit
0b5343e8c2
|
@ -284,10 +284,10 @@ config.baseUrl = "";
|
|||
|
||||
require.undef = function(module, recursive) {
|
||||
if (recursive) {
|
||||
var root = (module + "/").replace("//", "/");
|
||||
$undefAll(root, define.errors);
|
||||
$undefAll(root, define.loaded);
|
||||
$undefAll(root, define.modules);
|
||||
var root = (module + "/").replace(/\/+$/, "/");
|
||||
undefAll(root, define.errors);
|
||||
undefAll(root, define.loaded);
|
||||
undefAll(root, define.modules);
|
||||
}
|
||||
module = normalizeName("", module);
|
||||
var path = require.toUrl(module, ".js");
|
||||
|
@ -297,10 +297,11 @@ require.undef = function(module, recursive) {
|
|||
delete define.fetchedUrls[path];
|
||||
};
|
||||
|
||||
function $undefAll(module, hash) {
|
||||
for (var i in hash)
|
||||
if (i.lastIndexOf(module, 0) == 0)
|
||||
require.undef(i);
|
||||
function undefAll(module, hash) {
|
||||
Object.keys(hash).forEach(function(key) {
|
||||
if (key.lastIndexOf(module, 0) == 0)
|
||||
require.undef(key);
|
||||
});
|
||||
}
|
||||
|
||||
require.MODULE_LOAD_URL = MODULE_LOAD_URL;
|
||||
|
|
Ładowanie…
Reference in New Issue