-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Delta uses clone deep now and hits ERROR RangeError: Maximum call stack size exceeded #4180
Comments
All properties inside an op should be serializable (e.g. plain object) without and circular structures because those data would be returned when you call Not sure about your use case, but a potential solution could be creating/getting the service instance in the constructor of the blot based on the value. |
We pass in a service instance when the blot is created and then destroy the blot before before it's ever saved to the database. This blot is the anchor for a number menu's that pop-up and allow a final saveable blot to be created. The service allows us to minimize the amount of input/outputs that are required inside the blot... It's probably better, as you say, to serialize it, but it worked for us in 1.3.7. I guess it will be one of those some-day-refactors. Our ops look something like this:
where the I discovered that 1.3.7 code was not ACTUALLY using what is in [email protected]. It didn't use
And [email protected]:
Since the code in question: |
Delta inserts can be arbitrary objects as well (e.g. To solve that, I would maintain a map ( |
The Delta.push method has been changed from
to use cloneDeep which when cloneDeep is called it hits the maximum call stack error, ERROR RangeError: Maximum call stack size exceeded, anytime you pass a complicated/injectable class into the created Element.
There's even a comment in lodash "Recursively populate clone (susceptible to call stack limits)."
We pass an Angular Injectable Service instance into an Embed Blot, the blot is actually an Angular Element, and because it's a complicated objected being passed through Quill's code, this clone deep causes the max call stack error.
This was not an issue in 1.3.7.
Angular 17.3.7
Quill v2.0.1
The text was updated successfully, but these errors were encountered: