ClientTheme: do not use lodash on start method

This commit is contained in:
Nuckyz 2024-02-29 23:15:19 -03:00 committed by Vendicated
parent 1a1156e1ed
commit 806960f1c6
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -12,7 +12,7 @@ import { Margins } from "@utils/margins";
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import definePlugin, { OptionType, StartAt } from "@utils/types"; import definePlugin, { OptionType, StartAt } from "@utils/types";
import { findByPropsLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack"; import { findByPropsLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack";
import { Button, Forms, lodash as _, useStateFromStores } from "@webpack/common"; import { Button, Forms, useStateFromStores } from "@webpack/common";
const ColorPicker = findComponentByCodeLazy(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)"); const ColorPicker = findComponentByCodeLazy(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)");
@ -200,8 +200,8 @@ function captureOne(str, regex) {
return (result === null) ? null : result[1]; return (result === null) ? null : result[1];
} }
function mapReject(arr, mapFunc, rejectFunc = _.isNull) { function mapReject(arr, mapFunc) {
return _.reject(arr.map(mapFunc), rejectFunc); return arr.map(mapFunc).filter(Boolean);
} }
function updateColorVars(color: string) { function updateColorVars(color: string) {