Skip to content

Commit

Permalink
🩹 Remove empty style attribute after a rerender
Browse files Browse the repository at this point in the history
  • Loading branch information
skerit committed Feb 16, 2024
1 parent 392e405 commit 2951364
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/element/custom_element.js
Original file line number Diff line number Diff line change
Expand Up @@ -2676,6 +2676,10 @@ Element.setMethod(function rerender() {
if (client_rects?.width) {
this.style.width = previous_width;
this.style.height = previous_height;

if (this.getAttribute('style') == '') {
this.removeAttribute('style');
}
}
});

Expand Down

0 comments on commit 2951364

Please sign in to comment.