From 58f96312a2d1b3f282c23bedf00ded66aef38c72 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Fri, 26 Jul 2024 16:51:12 +0100 Subject: [PATCH] LibWeb: Add a default for the navigator's languages This will mean that non-Qt frontends don't return an empty array. (cherry picked from commit 7b105e1ecfe23d6954c8abae6735cf655ff57204) --- Userland/Libraries/LibWeb/Loader/ResourceLoader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h index 4bc2bc345ec675..146cdf684d0cfc 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h @@ -126,7 +126,7 @@ class ResourceLoader : public Core::EventReceiver { NonnullRefPtr m_connector; String m_user_agent; String m_platform; - Vector m_preferred_languages; + Vector m_preferred_languages = { "en"_string }; NavigatorCompatibilityMode m_navigator_compatibility_mode; bool m_enable_do_not_track { false }; Optional> m_page {};