Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Console] Fix an error with folds in the editor (#152366)
## Summary Fixes #151563 There is a combination of the folds in the editor (collapsed lines) and the text that can cause the editor to fail. This PR adds a try/catch clause to the editor, so that the UI can still be used. ### How to use 1. Open Kibana and in your browser's Dev Tools, delete everything from local storage. 2. Add following 2 items back to the local storage: ``` sense:folds [{"start":{"row":1,"column":1},"end":{"row":82,"column":4}}] sense:console_local_text-object_e69f508c-3342-45cf-ae7c-2753548ce8e7 {"id":"e69f508c-3342-45cf-ae7c-2753548ce8e7","createdAt":1675332935410,"updatedAt":1676630754720,"text":"GET _cat/indices"} ``` 3. Navigate to Console in Kibana, make sure the editor works. ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- Loading branch information