diff --git a/src/plugins/fakeProfileThemes/index.tsx b/src/plugins/fakeProfileThemes/index.tsx index cf29f4f15..1372fe52b 100644 --- a/src/plugins/fakeProfileThemes/index.tsx +++ b/src/plugins/fakeProfileThemes/index.tsx @@ -111,7 +111,7 @@ interface ProfileModalProps { const ColorPicker = findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)"); const ProfileModal = findComponentByCode("isTryItOutFlow:", "pendingThemeColors:", "pendingAvatarDecoration:", "EDIT_PROFILE_BANNER"); -const requireColorPicker = extractAndLoadChunksLazy("USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format", /createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/); +const requireColorPicker = extractAndLoadChunksLazy("USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format"); export default definePlugin({ name: "FakeProfileThemes", diff --git a/src/webpack/api.tsx b/src/webpack/api.tsx index 6b5c34ef8..8fccd0e1d 100644 --- a/src/webpack/api.tsx +++ b/src/webpack/api.tsx @@ -8,7 +8,7 @@ import { makeLazy, proxyLazy } from "@utils/lazy"; import { LazyComponent, LazyComponentType, SYM_LAZY_COMPONENT_INNER } from "@utils/lazyReact"; import { Logger } from "@utils/Logger"; import { canonicalizeMatch } from "@utils/patches"; -import { proxyInner, SYM_PROXY_INNER_VALUE } from "@utils/proxyInner"; +import { proxyInner, SYM_PROXY_INNER_GET, SYM_PROXY_INNER_VALUE } from "@utils/proxyInner"; import { traceFunction } from "../debug/Tracer"; import { GenericStore } from "./common"; @@ -605,7 +605,7 @@ export function extractAndLoadChunksLazy(code: string | RegExp | CodeFilter, mat const module = findModuleFactory(...Array.isArray(code) ? code : [code]); const extractAndLoadChunks = makeLazy(async () => { - if (module[SYM_PROXY_INNER_VALUE] == null) { + if (module[SYM_PROXY_INNER_GET] != null && module[SYM_PROXY_INNER_VALUE] == null) { const err = new Error("extractAndLoadChunks: Couldn't find module factory"); if (!IS_DEV || devToolsOpen) {