Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
Co-authored-by: Weston Ruter <[email protected]>
  • Loading branch information
swissspidy and westonruter authored Aug 3, 2023
1 parent 588e7ff commit 7fca058
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2466,10 +2466,6 @@ private function remove_disallowed_descendants( DOMElement $node, $allowed_desce
* @param string $spec_name Spec name.
*/
private function remove_disallowed_siblings( DOMElement $node, $spec_name ) {
if ( ! $node->previousSibling && ! $node->nextSibling ) {
return;
}

$prev_sibling = $node->previousSibling;
while ( null !== $prev_sibling ) {
$prev_prev_sibling = $prev_sibling->previousSibling;
Expand Down

0 comments on commit 7fca058

Please sign in to comment.