mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fallback to the url if a tabs title is empty (#33391)
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
This commit is contained in:
parent
f1ad364ec2
commit
7ec22306e8
1 changed files with 2 additions and 2 deletions
|
@ -359,8 +359,8 @@ impl Minibrowser {
|
||||||
|ui| {
|
|ui| {
|
||||||
for (webview_id, webview) in webviews.webviews().into_iter() {
|
for (webview_id, webview) in webviews.webviews().into_iter() {
|
||||||
let label = match (&webview.title, &webview.url) {
|
let label = match (&webview.title, &webview.url) {
|
||||||
(Some(title), _) => title,
|
(Some(title), _) if !title.is_empty() => title,
|
||||||
(None, Some(url)) => &url.to_string(),
|
(_, Some(url)) => &url.to_string(),
|
||||||
_ => "New Tab",
|
_ => "New Tab",
|
||||||
};
|
};
|
||||||
if let Some(event) =
|
if let Some(event) =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue