fix url input null when web load fail bug

This commit is contained in:
DASHU
2024-12-10 11:09:49 +08:00
parent 3fa5ad2930
commit def324e999

View File

@@ -101,8 +101,12 @@ class _IndexWebComponent extends State<IndexWebComponent> {
}
var url = await webInfo.controller!.getUrl();
var urlStr = url.toString();
if (StringUtil.isBlank(urlStr) || urlStr == "null") {
urlStr = webInfo.url;
}
var value = await RouterUtil.router(
context, RouterPath.WEB_URL_INPUT, url.toString());
context, RouterPath.WEB_URL_INPUT, urlStr);
if (value != null && value is String) {
webProvider.goTo(webInfo, value);
}