From c6950b9b56d32c51f4808d439d035f5b9dc2af38 Mon Sep 17 00:00:00 2001 From: Alexander Do Date: Sat, 7 Apr 2018 02:53:00 +0000 Subject: [PATCH] Default to en if browser does not provide a language --- js/privatebin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/privatebin.js b/js/privatebin.js index a39c38a..436a7de 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -441,7 +441,7 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) { // auto-select language based on browser settings if (newLanguage.length === 0) { - newLanguage = (navigator.language || navigator.userLanguage).substring(0, 2); + newLanguage = (navigator.language || navigator.userLanguage || 'en').substring(0, 2); } // if language is already used skip update