mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-15 12:12:31 +08:00
Summary: When tapping on a link in a WebView with an unknown scheme, the app would crash. For example, if you have the link "something://example/" but your device doesn't have anything to handle the "something" scheme, the app would crash when the user clicks on the link. This change handles the exception to prevent the app from crashing. Instead, the click is a no-op and the WebView doesn't navigate anywhere. **Test plan (required)** Verified the app no longer crashes when clicking on unknown schemes in a test app. Also, my team uses this change in our app. Adam Comella Microsoft Corp. Closes https://github.com/facebook/react-native/pull/10903 Differential Revision: D4226371 Pulled By: mkonicek fbshipit-source-id: a6d3957806c6063e74fe055b0979cb9d1ce40e51