@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.umd.js CHANGED
@@ -318,7 +318,7 @@
318
318
  return;
319
319
  }
320
320
  if (key === 'class') {
321
- const valueClasses = value ? value.split(' ') : [];
321
+ const valueClasses = value ? String(value).split(' ') : [];
322
322
  const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(' ') : [];
323
323
  const insertClasses = valueClasses.filter(valueClass => !existingClasses.includes(valueClass));
324
324
  mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ');
@@ -360,6 +360,7 @@
360
360
  .reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {});
361
361
  }
362
362
 
363
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
363
364
  function isFunction(value) {
364
365
  return typeof value === 'function';
365
366
  }
@@ -1019,7 +1020,7 @@
1019
1020
  try {
1020
1021
  dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;
1021
1022
  }
1022
- catch (e) {
1023
+ catch {
1023
1024
  dropEvent = null;
1024
1025
  }
1025
1026
  const processEvent = ({ state, from, to, rule, pasteEvt, }) => {
@@ -1043,7 +1044,7 @@
1043
1044
  try {
1044
1045
  dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;
1045
1046
  }
1046
- catch (e) {
1047
+ catch {
1047
1048
  dropEvent = null;
1048
1049
  }
1049
1050
  pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;
@@ -2158,7 +2159,7 @@
2158
2159
  }
2159
2160
  return true;
2160
2161
  }
2161
- catch (e) {
2162
+ catch {
2162
2163
  return false;
2163
2164
  }
2164
2165
  };
@@ -2175,7 +2176,7 @@
2175
2176
  }
2176
2177
  return true;
2177
2178
  }
2178
- catch (e) {
2179
+ catch {
2179
2180
  return false;
2180
2181
  }
2181
2182
  };