clean up
This commit is contained in:
parent
bb3f629672
commit
ac61a0377f
|
@ -160,8 +160,7 @@ function initWs(isManual = false) {
|
|||
return reply("Expected exactly one 'find' matches, found " + keys.length);
|
||||
|
||||
const mod = candidates[keys[0]];
|
||||
// @ts-ignore
|
||||
let src = String(mod.$$vencordOriginal ?? mod).replaceAll("\n", "");
|
||||
let src = mod.toString().replaceAll("\n", "");
|
||||
|
||||
if (src.startsWith("function(")) {
|
||||
src = "0," + src;
|
||||
|
|
|
@ -501,7 +501,7 @@ export function search(...filters: Array<string | RegExp>) {
|
|||
outer:
|
||||
for (const id in factories) {
|
||||
// @ts-ignore
|
||||
const factory = factories[id].$$vencordOriginal ?? factories[id];
|
||||
const factory = factories[id];
|
||||
const str: string = factory.toString();
|
||||
for (const filter of filters) {
|
||||
if (typeof filter === "string" && !str.includes(filter)) continue outer;
|
||||
|
|
Loading…
Reference in a new issue