We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1073b8 commit dd8b59aCopy full SHA for dd8b59a
src/GTranslator.php
@@ -697,15 +697,15 @@ public function addScript(): string{
697
},
698
Init:function(){
699
GTranslator.GoogleScript();
700
- if(null!=GTranslator.Current()){
701
- var formObj = document.getElementsByClassName('php-language-select');
+ if(null != GTranslator.Current()){
+ var formObj = document.getElementsByClassName('php-language-select')[0];
702
for(let i = 0, len = formObj.length; i < len; i++){
703
- if(formObj[i].value == GTranslator.Current()){
704
- formObj[i].options[i].selected = true;
+ if(formObj.options[i].value === GTranslator.Current()){
+ formObj.options[i].selected = true;
705
}
706
707
708
- }
+ }
709
";
710
711
0 commit comments