Skip to content

Commit d270b24

Browse files
fix: storybook load error
1 parent e1af190 commit d270b24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ import { AppRegistry, LogBox } from 'react-native';
55
import { name as appName } from './app.json';
66
import { isAndroid } from './app/lib/methods/helpers';
77

8+
const StorybookModule = require('./.rnstorybook/index');
9+
810
if (process.env.USE_STORYBOOK) {
9-
AppRegistry.registerComponent(appName, () => require('./.rnstorybook/index').default);
11+
AppRegistry.registerComponent(appName, () => require('./.rnstorybook/index').default ?? StorybookModule);
1012
} else {
1113
if (!__DEV__) {
1214
console.log = () => {};

0 commit comments

Comments
 (0)