-
Notifications
You must be signed in to change notification settings - Fork 130
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
Uncaught TypeError: Converting circular structure to JSON --> starting at object with constructor 'TextEditor' | property 'decorationManager' -> object with constructor 'DecorationManager' --- property 'editor' closes the circle #793
Comments
I can reproduce this. I will look into it tonight. |
looks like the issue is in minimap Lines 1118 to 1124 in 47cb108
@aminya it looks like minimap becomes null when using zen mode |
I haven't used Zen mode before. We should also fix the error message. Does it seem that one of the packages is modifying the |
It seems like zen mode toggles minimap but minimap doesn't stop trying to create markers. |
Toggling works without issues unless you overdo it consecutively and close/open text editors multiple times (#772). Once Line 166 in 47cb108
The solution is that the plugins should check if what they are getting is valid. They should check if the return of the old API is valid (non-null). Line 1131 in 47cb108
The other solution is to use the new DecorationsManagement API from the |
We can also do something like the following if the plugins don't already do the null check. In this case, we should return getDecorations() {
return this.getDecorationManagement()?.getDecorations() ?? []
} Lines 1130 to 1133 in 47cb108
|
🎉 This issue has been resolved in version 4.39.14 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Reproduction steps
zen
,highlight-selected
, andminimap-highlight-selected
This bug was also previously reported here which was apparently a duplicate of this bug, but ultimately it was determined that the bug is located in this package, not
highlight-selected
.Atom: 1.56.0 x64
Electron: 9.4.4
OS: Ubuntu 20.10
Thrown From: highlight-selected package 0.17.0
Stack Trace
Uncaught TypeError: Converting circular structure to JSON
--> starting at object with constructor 'TextEditor'
| property 'decorationManager' -> object with constructor 'DecorationManager'
--- property 'editor' closes the circle
Commands
Non-Core Packages
The text was updated successfully, but these errors were encountered: