Skip to content

Commit e79a558

Browse files
authored
Merge pull request #78 from react-native-community/fix/global-error
Fix issue with global.HermesIternal
2 parents da00aff + 66b6b39 commit e79a558

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

template/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
} from 'react-native/Libraries/NewAppScreen';
2828

2929
const App = () => {
30+
const usingHermes = typeof HermesInternal === 'object' && HermesInternal !== null;
3031
return (
3132
<>
3233
<StatusBar barStyle="dark-content" />
@@ -35,7 +36,7 @@ const App = () => {
3536
contentInsetAdjustmentBehavior="automatic"
3637
style={styles.scrollView}>
3738
<Header />
38-
{global.HermesInternal == null ? null : (
39+
{!usingHermes ? null : (
3940
<View style={styles.engine}>
4041
<Text style={styles.footer}>Engine: Hermes</Text>
4142
</View>

0 commit comments

Comments
 (0)