From 648d05f6b2fb459c2f37f19e881d15598c480608 Mon Sep 17 00:00:00 2001 From: Ally Founder Date: Mon, 10 Aug 2026 21:10:01 -0400 Subject: [PATCH] FakeProfileThemesAndEffects: fix plugin unable to enable at all --- .../FallbackEffectPickerActionSheet.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/fake-profile-themes-and-effects/src/ui/actionSheets/FallbackEffectPickerActionSheet.tsx b/plugins/fake-profile-themes-and-effects/src/ui/actionSheets/FallbackEffectPickerActionSheet.tsx index 8bc5eb6..ceead60 100644 --- a/plugins/fake-profile-themes-and-effects/src/ui/actionSheets/FallbackEffectPickerActionSheet.tsx +++ b/plugins/fake-profile-themes-and-effects/src/ui/actionSheets/FallbackEffectPickerActionSheet.tsx @@ -1,4 +1,3 @@ -import { chunk } from "lodash"; import React, { type ReactNode, useContext, useMemo, useState } from "react"; import { View, type ViewStyle } from "react-native"; @@ -12,6 +11,18 @@ import { Radius, SafeAreaContext, Spacing, useWindowDimensions } from "@fpte/ui/ const ROW_SIZE = 3; +// lodash isn't a dependency of this repo (no node_modules/lodash, nothing in package.json) - the +// build's Rollup config only marks react/react-native external, so an unresolved "lodash" import +// got emitted as a bare, undefined global reference in the compiled bundle. That threw +// "ReferenceError: lodash is not defined" the instant Revenge evaluated this plugin's bundle, +// before onLoad ever ran - which is why enabling the plugin silently reverted with no visible +// error anywhere. Only one function was ever used from it, so it's inlined here instead. +function chunk(arr: T[], size: number): T[][] { + const result: T[][] = []; + for (let i = 0; i < arr.length; i += size) result.push(arr.slice(i, i + size)); + return result; +} + interface ItemProps { label: string; isSelected: boolean;