1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:47:35 +00:00

Browser: Remove previous history entry in History::replace_current()

The lack of this action caused a bug in my original patch
(https://github.com/SerenityOS/serenity/pull/16004) that appeared when
accessing a site that redirected the client and it was the first site
the client loaded.
This commit is contained in:
Baitinq 2022-11-26 19:03:45 +01:00 committed by Andreas Kling
parent 8e16588757
commit f3763a5275

View file

@ -35,6 +35,7 @@ void History::replace_current(const URL& url, String const& title)
if (m_current == -1) if (m_current == -1)
return; return;
m_items.remove(m_current);
m_current--; m_current--;
push(url, title); push(url, title);
} }