Skip to content

Commit 12aa5c7

Browse files
committed
Fixed title not resetting for empty texts
1 parent 2fd1889 commit 12aa5c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,12 @@
105105
}
106106

107107
function updateTitle(value) {
108+
document.title = '{{ site.tagline }}';
109+
108110
const rawTitle = value.split('\n', 1)[0];
109111
if (rawTitle === '') { return; }
110112
const truncatedTitle = truncate(rawTitle.trim(), 30);
111-
document.title = truncatedTitle + ' | ' + '{{ site.tagline }}';
113+
document.title = truncatedTitle + ' | ' + document.title;
112114
}
113115

114116
function truncate(string, limit) {

0 commit comments

Comments
 (0)