Skip to content

Commit

Permalink
fix: eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
idebenone committed Nov 21, 2024
1 parent d485309 commit 7ec2c0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default class Dom {
public static swap(el1: HTMLElement, el2: HTMLElement): void {
// create marker element and insert it where el1 is
const temp = document.createElement('div'),
parent = el1.parentNode;
parent = el1.parentNode;

parent.insertBefore(temp, el1);

Expand Down Expand Up @@ -225,7 +225,7 @@ export default class Dom {
* @type {string}
*/
const child = atLast ? 'lastChild' : 'firstChild',
sibling = atLast ? 'previousSibling' : 'nextSibling';
sibling = atLast ? 'previousSibling' : 'nextSibling';

if (node && node.nodeType === Node.ELEMENT_NODE && node[child]) {
let nodeChild = node[child] as Node;
Expand Down Expand Up @@ -400,7 +400,7 @@ export default class Dom {
* @returns {boolean}
*/
public static isEmpty(node: Node, ignoreChars?: string): boolean {
const treeWalker = [node];
const treeWalker = [ node ];

while (treeWalker.length > 0) {
node = treeWalker.shift();
Expand Down Expand Up @@ -534,7 +534,7 @@ export default class Dom {
*/
public static getDeepestBlockElements(parent: HTMLElement): HTMLElement[] {
if (Dom.containsOnlyInlineElements(parent)) {
return [parent];
return [ parent ];
}

return Array.from(parent.children).reduce((result, element) => {
Expand Down

0 comments on commit 7ec2c0f

Please sign in to comment.