From e539b24c84b4a4a18d20e77fa7c4fcbefbfefeac Mon Sep 17 00:00:00 2001 From: Darren Date: Thu, 8 May 2014 10:49:03 +0100 Subject: [PATCH] Default locale if one couldn't be negotiated --- server/httphandler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/httphandler.js b/server/httphandler.js index 1fdcf95..f491dde 100644 --- a/server/httphandler.js +++ b/server/httphandler.js @@ -93,6 +93,9 @@ var serveMagicLocale = function (request, response) { } else { negotiator = new Negotiator(request); found_locale = negotiator.language(cached_available_locales); + + // If a locale couldn't be negotiated, use the default + found_locale = found_locale || default_locale_id; } // Send a locale to the browser -- 2.25.1