debian-mirror-gitlab/app/assets/javascripts/lib/utils/dom_utils.js

8 lines
178 B
JavaScript
Raw Normal View History

2017-09-10 17:25:29 +05:30
/* eslint-disable import/prefer-default-export */
export const addClassIfElementExists = (element, className) => {
if (element) {
element.classList.add(className);
}
};