debian-mirror-gitlab/app/assets/javascripts/editor/utils.js

12 lines
195 B
JavaScript
Raw Normal View History

2021-03-08 18:12:59 +05:30
export const clearDomElement = (el) => {
2020-03-13 15:44:24 +05:30
if (!el || !el.firstChild) return;
while (el.firstChild) {
el.removeChild(el.firstChild);
}
};
export default () => ({
clearDomElement,
});