Skip to content

Commit

Permalink
early return in block text decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
Sartxi committed Nov 4, 2024
1 parent 3ca02e5 commit 4cd0f18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libs/utils/decorate.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function elContainsText(el) {
}

export function decorateBlockText(el, config = ['m', 's', 'm'], type = null) {
if (!el) return;
let headings = el.querySelectorAll('h1, h2, h3, h4, h5, h6');
if (!el.classList.contains('default')) {
if (headings) {
Expand Down

0 comments on commit 4cd0f18

Please sign in to comment.