Skip to content

Commit

Permalink
fix(styles): fix padding bug
Browse files Browse the repository at this point in the history
change :
const emptyDivElements = contentElement.querySelectorAll('div:empty');

for :
const emptyDivElements = contentElement.querySelectorAll('div');

Thanks to this change, the for loop no longer searches for empty divs, but for divs with a length of 0.
  • Loading branch information
Loris Giraud authored and burgerni10 committed Jul 31, 2023
1 parent c98e3a0 commit 1bbbef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/app/shared/box/box.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class BoxComponent implements AfterContentInit {
if (contentElement) {
const tableElement = contentElement.querySelector('table');
const alertWarningElement = contentElement.querySelector('.alert-warning');
const emptyDivElements = contentElement.querySelectorAll('div:empty');
const emptyDivElements = contentElement.querySelectorAll('div');

contentElement.classList.remove('has-empty-div', 'has-table', 'has-alert-warning'); // Deletes the existing class

Expand Down

0 comments on commit 1bbbef0

Please sign in to comment.