From da6a26548b8aa13fbe39a123bb652c0e35b4dd37 Mon Sep 17 00:00:00 2001 From: Brent Erickson Date: Tue, 12 Feb 2019 13:39:35 -0800 Subject: [PATCH] Fix crash in RNTester when removing/developing tests (#23406) Summary: Ensure that the current openExample (stored in AsyncStorage) exists in the module list. It's possible for the example to be missing if a test was removed & previously open in RNTester OR when actively developing RNTester tests & switching between branches [General] [Fixed] - Potential crash in RNTester when removing/developing test cases Pull Request resolved: https://github.com/facebook/react-native/pull/23406 Differential Revision: D14055695 Pulled By: cpojer fbshipit-source-id: 6cf00e097e934f7a342e7d210b6319e1cba142ca --- RNTester/js/RNTesterApp.ios.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RNTester/js/RNTesterApp.ios.js b/RNTester/js/RNTesterApp.ios.js index e6bf7457aac..2ef1ff817e2 100644 --- a/RNTester/js/RNTesterApp.ios.js +++ b/RNTester/js/RNTesterApp.ios.js @@ -110,7 +110,7 @@ class RNTesterApp extends React.Component { } if (this.state.openExample) { const Component = RNTesterList.Modules[this.state.openExample]; - if (Component.external) { + if (Component && Component.external) { return ; } else { return (