"entries is undefined" error when trying to view Undo using inspector.js
- Dominant language
- JavaScript
- Stars
- 20k
- Forks
- 1.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 13
Description
_Maybe this is because I'm getting the files via `npm install trix`..._
When using the inspector (as per [this comment](https://github.com/basecamp/trix/issues/415#issuecomment-310491148)), the console shows "Uncaught TypeError: entries is undefined" when the Undo section is opened. On subsequent refreshes, the error is shown right away because the state of the section is saved in Session Storage.
##### Steps to Reproduce
Include `inspector.js` file and add
```javascript
document.addEventListener("trix-initialize", function(event) {
Trix.Inspector.install(event.target);
});
```
In the inspector area _[note that it will be position:absolute to the right, outside the visual viewport, if the Trix editor takes the entire width of the page]_, click the `Undo` heading to expand it. Nothing is shown under the heading and the error is written to the console. It makes no difference whether or not something is typed in the editor before toggling the section.
##### Details
* Trix version: 2.0.4
* Browser name and version: Firefox 108.0.1
* Operating system: Windows 10 Pro
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in inspector.js with the Undo section and reproduce the error using the trix-initialize listener shown in the issue. Check why expanding Undo leaves entries undefined, then verify that the section displays its contents without a console error and that refreshing does not immediately reproduce the failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100