diff --git a/src/plugins/developer-settings/pages/Developer.tsx b/src/plugins/developer-settings/pages/Developer.tsx index dfe9e20..67cbfd1 100644 --- a/src/plugins/developer-settings/pages/Developer.tsx +++ b/src/plugins/developer-settings/pages/Developer.tsx @@ -13,6 +13,11 @@ import { import { BundleUpdaterManager, FileModule } from '@revenge-mod/modules/native' import { storageContextSymbol, useObserveStorage } from '@revenge-mod/storage' +import { settings } from '@revenge-mod/preferences' +import { PluginsDirectoryPath } from '@revenge-mod/shared/paths' + +import { getErrorStack } from '@revenge-mod/utils/errors' + import PageWrapper from '../../../plugins/settings/pages/(Wrapper)' import { @@ -30,11 +35,11 @@ import { disconnectFromDevTools, } from '../devtools' -import { settings } from '@revenge-mod/preferences' -import { PluginsDirectoryPath } from '@revenge-mod/shared/paths' +import { PluginContext } from '..' + import { useContext, useEffect, useRef, useState } from 'react' import { ScrollView } from 'react-native' -import { PluginContext } from '..' + export default function DeveloperSettingsPage() { const context = useContext(PluginContext) @@ -239,13 +244,6 @@ export default function DeveloperSettingsPage() { } /> - - } - onPress={() => navigation.navigate('RevengeDebugPerformanceTimes')} - /> - { - // biome-ignore lint/security/noGlobalEval: This is intentional - const res = globalThis.eval(codeRef.current) + try { + // biome-ignore lint/security/noGlobalEval: This is intentional + const res = globalThis.eval(codeRef.current) - alert( - modules.findProp<(val: unknown, opts?: { depth?: number }) => string>('inspect')!( - res instanceof Promise && evalAwaitResult ? await res : res, - { depth: 5 }, - ), - ) + alert( + modules.findProp<(val: unknown, opts?: { depth?: number }) => string>('inspect')!( + res instanceof Promise && evalAwaitResult ? await res : res, + { depth: 5 }, + ), + ) + } catch (e) { + alert(getErrorStack(e)) + } }} />