serdarciplak / BlazorMonaco

Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
https://serdarciplak.github.io/BlazorMonaco/
MIT License
432 stars 98 forks source link

Fixed bug: "Converting circular structure to JSON" if using getAllDecorations() #88

Closed pit234 closed 11 months ago

pit234 commented 1 year ago

Calling getAllDecorations() returns internal members like parent ... These members seems to produce circular references while converting the decorations to json. To fix it, I added a method "compactDecorations()" which creates an array of decorations only containing the official members and call them in getAllDecorations() and other decoration-related methods.

serdarciplak commented 11 months ago

Fixed this issue with a generic method instead of a method that works only for decorations. You can find it in PR #96. Thanks a lot for letting me know with this PR!