@javascriptcommon/react-native-webview 13.18.2 → 13.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -341,7 +341,10 @@ public class RNCWebViewClient extends WebViewClient {
341
341
 
342
342
  description = descriptionPrefix + description;
343
343
 
344
- if (!topWindowUrl.equalsIgnoreCase(failingUrl)) {
344
+ // getUrl() is null until the first navigation commits, so an SSL error on the very first load
345
+ // arrives with no top-level URL at all. That load IS the top-level navigation: report it as one
346
+ // instead of dereferencing null on the UI thread.
347
+ if (topWindowUrl != null && !topWindowUrl.equalsIgnoreCase(failingUrl)) {
345
348
  // If error is not due to top-level navigation, then do not call onReceivedError()
346
349
  Log.w(TAG, "Resource blocked from loading due to SSL error. Blocked URL: "+failingUrl);
347
350
  this.onReceivedSubResourceSslError(
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "Thibault Malbranche <malbranche.thibault@gmail.com>"
11
11
  ],
12
12
  "license": "MIT",
13
- "version": "13.18.2",
13
+ "version": "13.18.3",
14
14
  "homepage": "https://github.com/react-native-webview/react-native-webview#readme",
15
15
  "scripts": {
16
16
  "android": "react-native run-android",