@tiptap/core 2.1.1 → 2.1.3

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.umd.js CHANGED
@@ -300,8 +300,8 @@
300
300
  return;
301
301
  }
302
302
  if (key === 'class') {
303
- const valueClasses = value.split(' ');
304
- const existingClasses = mergedAttributes[key].split(' ');
303
+ const valueClasses = value ? value.split(' ') : [];
304
+ const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(' ') : [];
305
305
  const insertClasses = valueClasses.filter(valueClass => !existingClasses.includes(valueClass));
306
306
  mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ');
307
307
  }