[Bug]: When the class attribute is of type number, a runtime error occurs. #5995
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Bug
The issue or pullrequest is related to a bug
Affected Packages
core
Version(s)
2.8.0
Bug Description
The data comes from HTML generated by another editor and converted to JSON using the generateJSON function extended by @tiptap/core. It is possible that the value of the class attribute is of type number. In this case, calling split will fail. Should we add a check for typeof value === 'string' to improve the robustness of the code?
tiptap/packages/core/src/utilities/mergeAttributes.ts
Line 17 in dac7fd2
Browser Used
Chrome
Code Example URL
No response
Expected Behavior
no error
Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: