mirror of
https://git.zx2c4.com/cgit
synced 2025-08-28 21:58:18 +02:00
ui-shared: don't write <link> if favicon unset
Since the favicon setting defaults to "/favicon.ico", the user can only unset it with favicon=. However, that would write an empty string as the config value. Previously, such empty string always satisfied the if condition. In this case it is better to omit the <link> entirely. Signed-off-by: Christian Barcenas <christian@cbarcenas.com> Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
28404bef7e
commit
83f6542f20
1 changed files with 1 additions and 1 deletions
|
@ -838,7 +838,7 @@ void cgit_print_docstart(void)
|
|||
else
|
||||
emit_js_link(NULL, "/cgit.js");
|
||||
|
||||
if (ctx.cfg.favicon) {
|
||||
if (ctx.cfg.favicon && *ctx.cfg.favicon) {
|
||||
html("<link rel='shortcut icon' href='");
|
||||
html_attr(ctx.cfg.favicon);
|
||||
html("'/>\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue