From 45a876a0d5d9f2b5a5e022826e9be74a470b588c Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:02:19 -0300 Subject: [PATCH] more fixes --- src/plugins/fakeProfileThemes/index.tsx | 2 +- src/webpack/api.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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) {