Skip to content

Commit

Permalink
discoverygarden#80: fix container list block when unititle has descen…
Browse files Browse the repository at this point in the history
…dants
  • Loading branch information
ctgraham committed Nov 5, 2021
1 parent c0fee29 commit b374622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/jstreebuilder.inc
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ class JSTreeBuilder {
* Never actually got used?
*/
protected function getComponentTree(DOMElement $element) {
$title = $this->xpath->evaluate('normalize-space(string(ead:did/ead:unittitle/text()))', $element);
$date = $this->xpath->evaluate('normalize-space(string(ead:did/ead:unitdate/text()))', $element);
$title = $this->xpath->evaluate('normalize-space(string(ead:did/ead:unittitle/descendant-or-self::*/text()))', $element);
$date = $this->xpath->evaluate('normalize-space(string(ead:did/ead:unitdate/descendant-or-self::*/text()))', $element);
$text = empty($date) ?
$title :
format_string('@title (@date)', array(
Expand Down

0 comments on commit b374622

Please sign in to comment.