Commit c7008cf
authored
[webview_flutter_wkwebview] Fixes bug where
It seems that [WKWebView.customUserAgent](https://developer.apple.com/documentation/webkit/wkwebview/1414950-customuseragent?language=objc) is never actually set to nil. It was always an empty String. Even after attempting to set the value to nil, the value would always return as an empty String. This is in contrary to the documentation for the property.
I'm not sure if this is based on the iOS version, so this PR checks if the value is null or is empty.
Fixes flutter/flutter#135813WebkitWebViewController.getUserAgent was incorrectly returning an empty String (#5062)1 parent cfe0c21 commit c7008cf
File tree
4 files changed
+10
-2
lines changed- packages/webview_flutter/webview_flutter_wkwebview
- example/integration_test
- lib/src
4 files changed
+10
-2
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
670 | 673 | | |
671 | 674 | | |
672 | 675 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments