Make findStore use FluxStore.getAll instead of webpack searching

This commit is contained in:
Nuckyz 2025-02-16 16:54:35 -03:00
parent 5ec564558e
commit 8dfbb5f9d8
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -22,6 +22,7 @@ import { Logger } from "@utils/Logger";
import { canonicalizeMatch } from "@utils/patches";
import { traceFunction } from "../debug/Tracer";
import { Flux } from "./common";
import { AnyModuleFactory, ModuleExports, WebpackRequire } from "./wreq";
const logger = new Logger("Webpack");
@ -405,7 +406,7 @@ export function findByCodeLazy(...code: CodeFilter) {
* Find a store by its displayName
*/
export function findStore(name: StoreNameFilter) {
const res = find(filters.byStoreName(name), { isIndirect: true });
const res: any = Flux.Store.getAll().find(filters.byStoreName(name));
if (!res)
handleModuleNotFound("findStore", name);
return res;