Fixed initial page title being lost due to mistake in dynatos_title.

This commit is contained in:
Filipe Rodrigues 2024-03-11 01:45:15 +00:00
parent 805e5fd445
commit d31148bb4d
Signed by: zenithsiz
SSH Key Fingerprint: SHA256:Mb5ppb3Sh7IarBO/sBTXLHbYEOz37hJAlslLQPPAPaU

View File

@ -30,15 +30,14 @@ impl Title {
{
let title = title.into();
// Set and add the title to the stack
self::set_title(&title);
let title_idx = TITLE_STACK.with_borrow_mut(|stack| {
// If no title exists, add the current one
if stack.is_empty() {
stack.push(Some(self::cur_title()));
}
// Then add ours
// Then set and add ours
self::set_title(&title);
let title_idx = stack.len();
stack.push(Some(title));