@tiptap/core 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/utilities/mergeAttributes.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -306,8 +306,8 @@ function mergeAttributes(...objects) {
|
|
|
306
306
|
return;
|
|
307
307
|
}
|
|
308
308
|
if (key === 'class') {
|
|
309
|
-
const valueClasses = value.split(' ');
|
|
310
|
-
const existingClasses = mergedAttributes[key].split(' ');
|
|
309
|
+
const valueClasses = value ? value.split(' ') : [];
|
|
310
|
+
const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(' ') : [];
|
|
311
311
|
const insertClasses = valueClasses.filter(valueClass => !existingClasses.includes(valueClass));
|
|
312
312
|
mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ');
|
|
313
313
|
}
|