From f3205a4ea672d12c599b2e261bc18719d649db17 Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Thu, 16 Feb 2017 15:17:23 +0100 Subject: [PATCH] Make sure langauge in session store can be selected --- cadasta/core/static/js/xlang.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cadasta/core/static/js/xlang.js b/cadasta/core/static/js/xlang.js index fe3dcaac8..25df8a704 100644 --- a/cadasta/core/static/js/xlang.js +++ b/cadasta/core/static/js/xlang.js @@ -18,7 +18,7 @@ $(document).ready(function () { }); const form_lang = sessionStorage.getItem("form_lang"); - if (form_lang) { + if (form_lang && $('#form-langs-select option[value="' + form_lang + '"]').length) { $('#form-langs-select').val(form_lang); setLabels(form_lang); }