Skip to content

Commit

Permalink
style: 💄 Format
Browse files Browse the repository at this point in the history
  • Loading branch information
phun-ky committed Aug 30, 2024
1 parent 70ca641 commit 7d739cc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/utils/remove-speccer-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
export const removeSpeccerElement = (el: HTMLElement): void => {
const _selector = el.getAttribute('data-speccer-element-id');


if (!_selector) return;

const _pin_element =
Expand All @@ -28,15 +27,17 @@ export const removeSpeccerElement = (el: HTMLElement): void => {
if (!_pin_element) return;

if (Object.prototype.isPrototypeOf.call(NodeList.prototype, _pin_element)) {
[...(_pin_element as unknown as HTMLElement[])].forEach((el:HTMLElement) => {
el.remove();
el.classList.remove('is-specced');
});
[...(_pin_element as unknown as HTMLElement[])].forEach(
(el: HTMLElement) => {
el.remove();
el.classList.remove('is-specced');
}
);
} else {
// We also need to remove the svg paths if it is in use
if (
(_pin_element as HTMLElement).classList.contains('curly') ||
(_pin_element as HTMLElement).classList.contains('svg')
(_pin_element as HTMLElement).classList.contains('svg')
) {
const _el_ID = el.getAttribute('id');

Expand Down

0 comments on commit 7d739cc

Please sign in to comment.