mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-23 15:05:11 +00:00
future proof findStore
This commit is contained in:
parent
1a0a70eb24
commit
3dc7e8e44a
1 changed files with 4 additions and 1 deletions
|
@ -423,7 +423,10 @@ export function findByCodeLazy(...code: CodeFilter) {
|
|||
* Find a store by its displayName
|
||||
*/
|
||||
export function findStore(name: StoreNameFilter) {
|
||||
const res: any = Flux.Store.getAll().find(filters.byStoreName(name));
|
||||
const res = Flux.Store.getAll
|
||||
? Flux.Store.getAll().find(filters.byStoreName(name))
|
||||
: find(filters.byStoreName(name), { isIndirect: true });
|
||||
|
||||
if (!res)
|
||||
handleModuleNotFound("findStore", name);
|
||||
return res;
|
||||
|
|
Loading…
Add table
Reference in a new issue