[Hotfix] Fix iOS crash with RDT setting
This commit is contained in:
parent
93c4eef678
commit
0ee50404a9
1 changed files with 2 additions and 3 deletions
|
@ -9,7 +9,6 @@ import logger from "@lib/logger";
|
||||||
import AssetDisplay from "@ui/settings/components/AssetDisplay";
|
import AssetDisplay from "@ui/settings/components/AssetDisplay";
|
||||||
|
|
||||||
const { FormSection, FormRow, FormInput, FormDivider } = Forms;
|
const { FormSection, FormRow, FormInput, FormDivider } = Forms;
|
||||||
const { connectToDevTools } = window.__vendetta_rdc;
|
|
||||||
|
|
||||||
const styles = stylesheet.createThemedStyleSheet({
|
const styles = stylesheet.createThemedStyleSheet({
|
||||||
search: {
|
search: {
|
||||||
|
@ -45,13 +44,13 @@ export default function Developer() {
|
||||||
onPress={() => connectToDebugger(debuggerUrl)}
|
onPress={() => connectToDebugger(debuggerUrl)}
|
||||||
/>
|
/>
|
||||||
<FormDivider />
|
<FormDivider />
|
||||||
{connectToDevTools && <FormRow
|
{window.__vendetta_rdc && <FormRow
|
||||||
label="Connect to React DevTools"
|
label="Connect to React DevTools"
|
||||||
leading={() => <FormRow.Icon source={getAssetIDByName("ic_badge_staff")} />}
|
leading={() => <FormRow.Icon source={getAssetIDByName("ic_badge_staff")} />}
|
||||||
trailing={FormRow.Arrow}
|
trailing={FormRow.Arrow}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
try {
|
try {
|
||||||
connectToDevTools({
|
window.__vendetta_rdc?.connectToDevTools({
|
||||||
host: debuggerUrl.split(":")[0],
|
host: debuggerUrl.split(":")[0],
|
||||||
resolveRNStyle: RN.StyleSheet.flatten,
|
resolveRNStyle: RN.StyleSheet.flatten,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue