1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Handle null acceptedLanguages

Closes #704
This commit is contained in:
Nick O'Leary 2015-07-19 22:10:46 +01:00
parent 705d043540
commit a76e4fede1

View File

@ -119,7 +119,7 @@ function getCatalog(namespace,lang) {
function determineLangFromHeaders(acceptedLanguages){ function determineLangFromHeaders(acceptedLanguages){
var lang = "en-US"; var lang = "en-US";
acceptedLanguages = acceptedLanguages || [];
for (var i=0;i<acceptedLanguages.length;i++){ for (var i=0;i<acceptedLanguages.length;i++){
if (supportedLangs.indexOf(acceptedLanguages[i]) !== -1){ if (supportedLangs.indexOf(acceptedLanguages[i]) !== -1){
lang = acceptedLanguages[i]; lang = acceptedLanguages[i];