fix logged in dependant find

This commit is contained in:
Nuckyz 2024-08-03 15:28:18 -03:00
parent f9c11a1149
commit c183018fb1
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 4 additions and 4 deletions

View file

@ -299,7 +299,7 @@ export const commonOpts = {
logLevel: "info",
bundle: true,
watch,
minify: !watch,
minify: !watch && !IS_REPORTER,
sourcemap: watch ? "inline" : "",
legalComments: "linked",
banner,

View file

@ -28,8 +28,8 @@ import { Margins } from "@utils/margins";
import { classes, isObjectEmpty } from "@utils/misc";
import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { OptionType, Plugin } from "@utils/types";
import { findByProps, findComponentByCode, webpackDependantLazy } from "@webpack";
import { Button, Clickable, FluxDispatcher, Forms, React, Text, Tooltip, UserStore, UserUtils } from "@webpack/common";
import { find, findByProps, findComponentByCode } from "@webpack";
import { Button, Clickable, FluxDispatcher, Forms, React, Text, Tooltip, UserUtils } from "@webpack/common";
import { User } from "discord-types/general";
import { Constructor } from "type-fest";
@ -51,7 +51,7 @@ const cl = classNameFactory("vc-plugin-modal-");
const UserSummaryItem = findComponentByCode("defaultRenderUser", "showDefaultAvatarsForNullUsers");
const AvatarStyles = findByProps("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar");
const UserRecord = webpackDependantLazy<Constructor<Partial<User>>>(() => UserStore.getCurrentUser().constructor as any);
const UserRecord = find<Constructor<Partial<User>>>(m => m?.prototype?.getAvatarURL && m?.prototype?.hasHadPremium);
interface PluginModalProps extends ModalProps {
plugin: Plugin;