mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-23 15:05:11 +00:00
Priority blacklist module over returning if null export
This commit is contained in:
parent
1f0635ffc8
commit
6adae20449
1 changed files with 4 additions and 3 deletions
|
@ -417,9 +417,6 @@ function runFactoryWithWrap(patchedFactory: PatchedModuleFactory, thisArg: unkno
|
|||
}
|
||||
|
||||
exports = module.exports;
|
||||
if (exports == null) {
|
||||
return factoryReturn;
|
||||
}
|
||||
|
||||
if (typeof require === "function" && require.c) {
|
||||
if (_blacklistBadModules(require.c, exports, module.id)) {
|
||||
|
@ -427,6 +424,10 @@ function runFactoryWithWrap(patchedFactory: PatchedModuleFactory, thisArg: unkno
|
|||
}
|
||||
}
|
||||
|
||||
if (exports == null) {
|
||||
return factoryReturn;
|
||||
}
|
||||
|
||||
for (const callback of moduleListeners) {
|
||||
try {
|
||||
callback(exports, module.id);
|
||||
|
|
Loading…
Add table
Reference in a new issue