iteration fix

This commit is contained in:
Ondrej Zara
2019-09-05 10:55:49 +02:00
parent c70860efe6
commit 82b58e4993
+2 -2
View File
@@ -90,8 +90,8 @@ SQL.Designer.prototype.dbResponse = function(xmlDoc) {
SQL.Designer.prototype.applyStyle = function() { /* apply style */ SQL.Designer.prototype.applyStyle = function() { /* apply style */
var style = this.getOption("style"); var style = this.getOption("style");
var i, link_elms; var i, link_elms = document.querySelectorAll("link");
for (i=0; link_elms = document.getElementsByTagName("link"); i++) { for (i=0; i<link_elms.length; i++) {
if (link_elms[i].getAttribute("rel").indexOf("style") != -1 && link_elms[i].getAttribute("title")) { if (link_elms[i].getAttribute("rel").indexOf("style") != -1 && link_elms[i].getAttribute("title")) {
link_elms[i].disabled = true; link_elms[i].disabled = true;
if (link_elms[i].getAttribute("title") == style) link_elms[i].disabled = false; if (link_elms[i].getAttribute("title") == style) link_elms[i].disabled = false;