Explorar o código

root fixes for getElementsByName

Ivan Asmer %!s(int64=8) %!d(string=hai) anos
pai
achega
d4f281926c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      static/nb.js

+ 1 - 1
static/nb.js

@@ -24,7 +24,7 @@ function nbInit(a,b){
             items = root.querySelectorAll("#" + selector); 
         }
         items     = items[0]     ? items :  root.querySelectorAll(selector);
-        items     = items.length ? items :  root === document ? root.getElementsByName(selector) ? root.querySelectorAll("['name'='" + selector + "']"); 
+        items     = items.length ? items :  root === document ? root.getElementsByName(selector) : root.querySelectorAll("['name'='" + selector + "']"); 
         items     = items.length ? items :  root.getElementsByClassName(selector); 
         return items;
     }