Automattic / simplenote-electron

Simplenote for Web, Windows, and Linux
https://app.simplenote.com
GNU General Public License v2.0
4.69k stars 553 forks source link

Fix monaco recursion error #3184

Closed roundhill closed 3 months ago

roundhill commented 3 months ago

Fix

The latest Monaco was not happy with a recursive call: Invoking deltaDecorations recursively could lead to leaking decorations. I've replaced it with changeDecorations which I think is the same thing under the hood 🤷. But it removes the error :)

Test

  1. On web or electron, edit a task list. You should not see any errors about the recursion.
  2. In electron only, press cmd+g to search notes, press it again a few times. It should work and no recursion errors should be in the console.