Skip to content

Commit 83b1ffb

Browse files
committed
getCodeFrame: return null for web platform
1 parent be05622 commit 83b1ffb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime/src/symbolicate.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import type { CodeFrame } from '@react-native-harness/bridge';
2+
import { Platform } from 'react-native';
23
import parseErrorStack from 'react-native/Libraries/Core/Devtools/parseErrorStack';
34
import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace';
45

56
export const getCodeFrame = async (error: Error): Promise<CodeFrame | null> => {
7+
if (Platform.OS === 'web') {
8+
return null;
9+
}
610
const parsedStack = parseErrorStack(error.stack);
711
const symbolicatedStack = await symbolicateStackTrace(parsedStack);
812

0 commit comments

Comments
 (0)