diff options
author | Vendicated <vendicated@riseup.net> | 2022-10-09 22:15:14 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-10-09 22:15:23 +0200 |
commit | f875d63c6d1f4ccd4d81a15e900259a45486ba3f (patch) | |
tree | 53c76fb181806c84ca52605b40e296954c398b70 /src | |
parent | e7fb4ebd4eac99ca7b937c954d3b052f68627c57 (diff) | |
download | Vencord-f875d63c6d1f4ccd4d81a15e900259a45486ba3f.tar.gz Vencord-f875d63c6d1f4ccd4d81a15e900259a45486ba3f.tar.bz2 Vencord-f875d63c6d1f4ccd4d81a15e900259a45486ba3f.zip |
Fix webpack search
Diffstat (limited to 'src')
-rw-r--r-- | src/webpack/webpack.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index f1fea46..ca987d0 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -59,7 +59,7 @@ export function find(filter: FilterFn, getDefault = true) { // is 3 is the longest obfuscated export? // the length check makes search about 20% faster - for (const nestedMod in mod.exports) if (nestedMod.length < 3) { + for (const nestedMod in mod.exports) if (nestedMod.length <= 3) { const nested = mod.exports[nestedMod]; if (nested && filter(nested)) return nested; } @@ -68,7 +68,6 @@ export function find(filter: FilterFn, getDefault = true) { return null; } -// TODO fix export function findAll(filter: FilterFn, getDefault = true) { if (typeof filter !== "function") throw new Error("Invalid filter. Expected a function got " + typeof filter); @@ -84,7 +83,7 @@ export function findAll(filter: FilterFn, getDefault = true) { if (mod.exports.default && filter(mod.exports.default)) ret.push(getDefault ? mod.exports.default : mod.exports); - else for (const nestedMod in mod.exports) if (nestedMod.length < 3) { + else for (const nestedMod in mod.exports) if (nestedMod.length <= 3) { const nested = mod.exports[nestedMod]; if (nested && filter(nested)) ret.push(nested); } |