Explorar o código

Boot.Data fix

Correct initialization when en element matches with attribute selector
ina %!s(int64=13) %!d(string=hai) anos
pai
achega
ce204bb57b
Modificáronse 1 ficheiros con 1 adicións e 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)