From 3dc7e8e44ae75b9af06e2c56a07008360acb981e Mon Sep 17 00:00:00 2001 From: Vendicated Date: Mon, 17 Feb 2025 01:59:54 +0100 Subject: [PATCH] future proof findStore --- src/webpack/webpack.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index 24c549bc0..a224b2983 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -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;