Fix crashing on Chromium 124

This commit is contained in:
redphx 2024-04-17 15:45:45 +07:00
parent 6f9ae9a555
commit 7bd071d527

View File

@ -7143,13 +7143,7 @@ class UserAgent {
const profile = getPref(Preferences.USER_AGENT_PROFILE); const profile = getPref(Preferences.USER_AGENT_PROFILE);
if (profile === UserAgent.PROFILE_DEFAULT) { if (profile === UserAgent.PROFILE_DEFAULT) {
// Fix Kiwi 124 return;
if (window.navigator.userAgent.includes('Chrome/124.0.0.0')) {
newUserAgent = window.navigator.userAgent.replace('Chrome/124.0.0.0', 'Chrome/122.0.0.0')
} else {
return;
}
} }
if (!newUserAgent) { if (!newUserAgent) {