@tiptap/core 2.11.0 → 2.11.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.js CHANGED
@@ -320,7 +320,7 @@ function mergeAttributes(...objects) {
320
320
  return;
321
321
  }
322
322
  if (key === 'class') {
323
- const valueClasses = value ? value.split(' ') : [];
323
+ const valueClasses = value ? String(value).split(' ') : [];
324
324
  const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(' ') : [];
325
325
  const insertClasses = valueClasses.filter(valueClass => !existingClasses.includes(valueClass));
326
326
  mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ');
@@ -362,6 +362,7 @@ function getRenderedAttributes(nodeOrMark, extensionAttributes) {
362
362
  .reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {});
363
363
  }
364
364
 
365
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
365
366
  function isFunction(value) {
366
367
  return typeof value === 'function';
367
368
  }
@@ -1021,7 +1022,7 @@ function pasteRulesPlugin(props) {
1021
1022
  try {
1022
1023
  dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;
1023
1024
  }
1024
- catch (e) {
1025
+ catch {
1025
1026
  dropEvent = null;
1026
1027
  }
1027
1028
  const processEvent = ({ state, from, to, rule, pasteEvt, }) => {
@@ -1045,7 +1046,7 @@ function pasteRulesPlugin(props) {
1045
1046
  try {
1046
1047
  dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;
1047
1048
  }
1048
- catch (e) {
1049
+ catch {
1049
1050
  dropEvent = null;
1050
1051
  }
1051
1052
  pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;
@@ -2160,7 +2161,7 @@ const joinItemBackward = () => ({ state, dispatch, tr, }) => {
2160
2161
  }
2161
2162
  return true;
2162
2163
  }
2163
- catch (e) {
2164
+ catch {
2164
2165
  return false;
2165
2166
  }
2166
2167
  };
@@ -2177,7 +2178,7 @@ const joinItemForward = () => ({ state, dispatch, tr, }) => {
2177
2178
  }
2178
2179
  return true;
2179
2180
  }
2180
- catch (e) {
2181
+ catch {
2181
2182
  return false;
2182
2183
  }
2183
2184
  };