Make findStore use FluxStore.getAll instead of webpack searching
This commit is contained in:
parent
5ec564558e
commit
8dfbb5f9d8
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue