Skip to content

Commit

Permalink
issue cucumber#637 - allowing only supported languages
Browse files Browse the repository at this point in the history
  • Loading branch information
10xtechie committed Jun 24, 2022
1 parent eb6f0d4 commit f8aec78
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion themes/cucumber-sb/static/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,16 @@ ready(function() {
showOnly(localStorage.getItem('language'))
}
}else{
showOnly(selectedLang)
if(supportedLanguages.includes(selectedLang)){
showOnly(selectedLang)
}else{
if(localStorage.getItem('language') == ''){
showOnly(defaulLanguage)
localStorage.setItem('language', defaulLanguage)
}else{
showOnly(localStorage.getItem('language'))
}
}
}

each(document, '.tabs li', function(li) {
Expand Down

0 comments on commit f8aec78

Please sign in to comment.