From 8dfbb5f9d887b7135f73cfd0a262c5ba1826e9f4 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 16 Feb 2025 16:54:35 -0300 Subject: [PATCH] Make findStore use FluxStore.getAll instead of webpack searching --- src/webpack/webpack.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index fe939d9b9..e129b913d 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -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;