From 3b9002055933e570e55add041c90c2db5d620c55 Mon Sep 17 00:00:00 2001 From: rugk Date: Mon, 9 Apr 2018 14:13:18 +0200 Subject: [PATCH] Add explanation Ref https://github.com/PrivateBin/PrivateBin/pull/297#issuecomment-379586428 --- js/test/I18n.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/test/I18n.js b/js/test/I18n.js index c3a69b24..10d333a4 100644 --- a/js/test/I18n.js +++ b/js/test/I18n.js @@ -105,6 +105,8 @@ describe('I18n', function () { function() { var clean = jsdom('', {url: 'https://privatebin.net/'}); + // when navigator.userLanguage is undefined and no default language + // is specified, it would throw an error [ 'language', 'userLanguage' ].forEach(function (key) { Object.defineProperty(navigator, key, { value: undefined,