more fixes

This commit is contained in:
Nuckyz 2024-08-03 15:02:19 -03:00
parent 4d88a13f5e
commit 45a876a0d5
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 3 additions and 3 deletions

View file

@ -111,7 +111,7 @@ interface ProfileModalProps {
const ColorPicker = findComponentByCode<ColorPickerProps>(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)");
const ProfileModal = findComponentByCode<ProfileModalProps>("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",

View file

@ -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) {