Przeglądaj źródła

fixed option selection issue

Gildas 7 lat temu
rodzic
commit
9e6407353e
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      lib/single-file/single-file-core.js

+ 1 - 1
lib/single-file/single-file-core.js

@@ -327,7 +327,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 			});
 			this.doc.querySelectorAll("select").forEach(select => {
 				select.querySelectorAll("option").forEach(option => {
-					const selected = option.getAttribute(DOM.inputValueAttributeName(this.options.sessionId)) !== undefined;
+					const selected = option.getAttribute(DOM.inputValueAttributeName(this.options.sessionId)) != null;
 					if (selected) {
 						option.setAttribute("selected", "");
 					}