diff options
author | Ven <vendicated@riseup.net> | 2022-10-01 02:27:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-01 02:27:28 +0200 |
commit | ef353f1d66dbf1d14e528830d267aac518ed1beb (patch) | |
tree | 67d13f5ce3cf42150884376c5f8d9b98f7300b38 /src/webpack/webpack.ts | |
parent | 3e64054283acbbe2697c9fc583bba7a06e1003b2 (diff) | |
download | Vencord-ef353f1d66dbf1d14e528830d267aac518ed1beb.tar.gz Vencord-ef353f1d66dbf1d14e528830d267aac518ed1beb.tar.bz2 Vencord-ef353f1d66dbf1d14e528830d267aac518ed1beb.zip |
Better authors field (#18)
Diffstat (limited to 'src/webpack/webpack.ts')
-rw-r--r-- | src/webpack/webpack.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index ea5a7e3..9be576a 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -43,7 +43,7 @@ export function _initWebpack(instance: typeof window.webpackChunkdiscord_app) { export function find(filter: FilterFn, getDefault = true) { if (typeof filter !== "function") - throw new Error("Invalid filter. Expected a function got", filter); + throw new Error("Invalid filter. Expected a function got " + typeof filter); for (const key in cache) { const mod = cache[key]; @@ -70,7 +70,7 @@ export function find(filter: FilterFn, getDefault = true) { // TODO fix export function findAll(filter: FilterFn, getDefault = true) { - if (typeof filter !== "function") throw new Error("Invalid filter. Expected a function got", filter); + if (typeof filter !== "function") throw new Error("Invalid filter. Expected a function got " + typeof filter); const ret = [] as any[]; for (const key in cache) { @@ -108,7 +108,7 @@ export function findByDisplayName(deezNuts: string) { export function waitFor(filter: string | string[] | FilterFn, callback: CallbackFn) { if (typeof filter === "string") filter = filters.byProps([filter]); else if (Array.isArray(filter)) filter = filters.byProps(filter); - else if (typeof filter !== "function") throw new Error("filter must be a string, string[] or function, got", filter); + else if (typeof filter !== "function") throw new Error("filter must be a string, string[] or function, got " + typeof filter); const existing = find(filter!); if (existing) return void callback(existing); |