Explorar el Código

Boot.Data fix

Correct initialization when en element matches with attribute selector
ina hace 13 años
padre
commit
ce204bb57b
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/boot/Lungo.Boot.Data.coffee

+ 1 - 0
src/boot/Lungo.Boot.Data.coffee

@@ -31,6 +31,7 @@ Lungo.Boot.Data = do(lng = Lungo) ->
     element.find(selector).each (index, children) ->
       el = lng.dom(children)
       _bindDataAttribute el, el.data(key), attribute.html
+    _bindDataAttribute(element, element.data(key), attribute.html) if element.data(key)?
 
   _bindDataAttribute = (element, value, html) ->
     element.prepend html.replace(/\{\{value\}\}/g, value)