diff options
author | Ben <bennyschulenburg@gmx.de> | 2024-09-10 07:05:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 07:05:15 +0000 |
commit | 7ec22306e80c85f2c3fc15bb83cec4170ec1a254 (patch) | |
tree | 9d6302504320f905d6eecf4397174a1715fe69c9 /ports | |
parent | f1ad364ec2dacca3ec7d79830ef8da9f26fbf4e2 (diff) | |
download | servo-7ec22306e80c85f2c3fc15bb83cec4170ec1a254.tar.gz servo-7ec22306e80c85f2c3fc15bb83cec4170ec1a254.zip |
Fallback to the url if a tabs title is empty (#33391)
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
Diffstat (limited to 'ports')
-rw-r--r-- | ports/servoshell/desktop/minibrowser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/servoshell/desktop/minibrowser.rs b/ports/servoshell/desktop/minibrowser.rs index a19bae6f38c..ea71d8ca72c 100644 --- a/ports/servoshell/desktop/minibrowser.rs +++ b/ports/servoshell/desktop/minibrowser.rs @@ -359,8 +359,8 @@ impl Minibrowser { |ui| { for (webview_id, webview) in webviews.webviews().into_iter() { let label = match (&webview.title, &webview.url) { - (Some(title), _) => title, - (None, Some(url)) => &url.to_string(), + (Some(title), _) if !title.is_empty() => title, + (_, Some(url)) => &url.to_string(), _ => "New Tab", }; if let Some(event) = |