🍣 handle unexpected location.replace behavior

This commit is contained in:
Shiba 2022-08-09 22:44:40 +00:00
parent 5c9910dff1
commit a41b51e454

View file

@ -357,6 +357,11 @@ import { getExtensionSettingsAsync, getSourcePlatfromSettingsFromHostname, getTa
if (window.history.length === 1) if (window.history.length === 1)
{ {
location.replace(lbryURL) location.replace(lbryURL)
// Some extensions such as Firefox Multi-Account Containers, opens new tab for Odysee even though we say replace
// In those cases if the window is still active after 2 seconds we close it manually
await sleep(2000)
window.close()
} }
else else
{ {