mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 14:36:51 +00:00
Use DOMCompat::getFirstElementChild() now that it is available from Parsoid
There is only one child, so first/last element child are the same, but it's a little less confusing to use 'first' here. Follows-Up: Ifeb3b216e898bec1c3eb5917262820c5809fda45 Depends-On: I753bbbfaf99fb486384b0fa97de71159abb504b3 Change-Id: I65873c117cbd3e1d6efd82797c7b49bf707f5c3a
This commit is contained in:
parent
056e98a277
commit
87d4d23737
|
@ -54,7 +54,7 @@ class ErrorUtils {
|
|||
): DocumentFragment {
|
||||
$extApi->addTrackingCategory( 'cite-tracking-category-cite-error' );
|
||||
$fragment = $extApi->createInterfaceI18nFragment( 'cite_error', [ $error ] );
|
||||
$fragSpan = DOMCompat::getLastElementChild( $fragment );
|
||||
$fragSpan = DOMCompat::getFirstElementChild( $fragment );
|
||||
DOMUtils::addAttributes( $fragSpan, [ 'class' => 'error mw-ext-cite-error' ] );
|
||||
return $fragment;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue