-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError when initialized with null content #325
Comments
The content is assumed to not be null by the type definition, it's a bad idea to send a null value given a Delta or string is expected, usually with props you want to send
Other functions were not meant to handle null values as well like setContents The fix is easy enough, I'll include a fix for the type definition with it |
🎉 This issue has been resolved in version 1.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I started to get TypeError after this version. I think it's related to the default value of the content prop.
|
Please provide a reproduction if you think you encountered a bug Though the only way you'd get this error is if you passed an object that is not a delta to the content prop in delta mode, which is not a supported use case |
Thank you! The initial value of the |
Version
1.1.0
Describe the bug
Mounting
<QuillEditor>
withnull
content causes the following error:Uncaught (in promise) TypeError: Cannot read properties of null (reading 'slice')
This is a breaking changed introduced in #317 - https://github.com/vueup/vue-quill/pull/317/files#diff-0fe7a2c7e46d97a72a1fdc2df750c7b1a775050558328b4985c0095fef057cfaR189
typeof delta === 'object'
is an insufficient check asnull
is also an object.To Reproduce
Mount a
QuillEditor
component withnull
content:Expected behavior
The component can be mounted without error.
Browser (please complete the following information):
Arc Version 0.89.0 (37129)
Chromium Engine Version 110.0.5481.90
The text was updated successfully, but these errors were encountered: