8 lines
178 B
JavaScript
8 lines
178 B
JavaScript
|
/* eslint-disable import/prefer-default-export */
|
||
|
|
||
|
export const addClassIfElementExists = (element, className) => {
|
||
|
if (element) {
|
||
|
element.classList.add(className);
|
||
|
}
|
||
|
};
|