Conversation
boutell
commented
Sep 2, 2025
| item._edit = true; | ||
| } | ||
| item._docId = doc._id; | ||
| item._docId = area._docId; |
Member
Author
There was a problem hiding this comment.
set in line 2494, no need to duplicate logic
boutell
commented
Sep 2, 2025
| for (const [ key, val ] of Object.entries(o)) { | ||
| if (key === '_docId') { | ||
| newObject._docId = o._docId.replace(/:.*$/, ''); | ||
| newObject._docId = (o._docId == null) ? null : o._docId.replace(/:.*$/, ''); |
Member
Author
There was a problem hiding this comment.
don't crash on null, which is a thing in the modal
BoDonkey
approved these changes
Sep 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I tracked the issue to the render-widget route, which passes the widget to certain document loaders as if it were a document. Trouble occurs when the "areas" loader assumes the "doc" it has been given is a real doc and uses it to impute a value for docId.
This is problematic because docId is intentionally
nullin the editor dialog.I corrected the issue by verifying the
metaTypeofdocfirst.I also added this check in a few other places.
Finally, one piece of frontend code assumed
docIdcould not be null, so I had to fix that as well.