|
@@ -25,7 +25,9 @@ |
|
|
block discarded – undo |
|
25
|
25
|
/** Returns the data that has been bound to $element, or, if no data is bound to $element climb the DOM tree to find the data bound to a parent node*/ |
|
26
|
26
|
public function getData(\DomElement $element = null, $type = 'data') { |
|
27
|
27
|
while ($element) { |
|
28
|
|
- if (isset($this->elementMap[$element]) && array_key_exists($type, $this->elementMap[$element])) return $this->elementMap[$element][$type]; |
|
|
28
|
+ if (isset($this->elementMap[$element]) && array_key_exists($type, $this->elementMap[$element])) { |
|
|
29
|
+ return $this->elementMap[$element][$type]; |
|
|
30
|
+ } |
|
29
|
31
|
$element = $element->parentNode; |
|
30
|
32
|
} |
|
31
|
33
|
return $this->data; |
Please login to merge, or discard this patch.