fix: Fix adding unwanted class 'null'

This commit is contained in:
severn101 2017-08-05 00:07:34 +05:00 committed by Cole Bemis
parent f72c5dd215
commit 8926f5fb9b

View File

@ -41,7 +41,7 @@ function replaceElement(element, options) {
return;
}
const elementClassAttr = element.getAttribute('class');
const elementClassAttr = element.getAttribute('class') || '';
const classNames = (
options.class ? `${options.class} ${elementClassAttr}` : elementClassAttr
);