This commit is contained in:
Mirco Wittrien 2020-01-05 15:18:14 +01:00
parent e44db06c11
commit b5579893c4
2 changed files with 6 additions and 6 deletions

View File

@ -977,14 +977,14 @@
return InternalBDFDB.findModule("proto", JSON.stringify(protoprops), m => m.prototype && protoprops.every(prop => m.prototype[prop] !== undefined), getExport);
};
InternalBDFDB.findModule = function (type, cachestring, filter, getExport) {
if (!BDFDB.ObjectUtils.is(window.BDFDB.ModuleUtils.cached[type])) window.BDFDB.ModuleUtils.cached[type] = {module:{}, export:{}};
if (getExport && window.BDFDB.ModuleUtils.cached[type].export[cachestring]) return window.BDFDB.ModuleUtils.cached[type].export[cachestring];
else if (!getExport && window.BDFDB.ModuleUtils.cached[type].module[cachestring]) return window.BDFDB.ModuleUtils.cached[type].module[cachestring];
if (!BDFDB.ObjectUtils.is(BDFDB.ModuleUtils.cached[type])) BDFDB.ModuleUtils.cached[type] = {module:{}, export:{}};
if (getExport && BDFDB.ModuleUtils.cached[type].export[cachestring]) return BDFDB.ModuleUtils.cached[type].export[cachestring];
else if (!getExport && BDFDB.ModuleUtils.cached[type].module[cachestring]) return BDFDB.ModuleUtils.cached[type].module[cachestring];
else {
var m = BDFDB.ModuleUtils.find(filter, getExport);
if (m) {
if (getExport) window.BDFDB.ModuleUtils.cached[type].export[cachestring] = m;
else window.BDFDB.ModuleUtils.cached[type].module[cachestring] = m;
if (getExport) BDFDB.ModuleUtils.cached[type].export[cachestring] = m;
else BDFDB.ModuleUtils.cached[type].module[cachestring] = m;
return m;
}
else BDFDB.LogUtils.warn(`${cachestring} [${type}] not found in WebModules`);

File diff suppressed because one or more lines are too long