Config metadata dimensions object is undefined
- Dominant language
- JavaScript
- Stars
- 333
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
This has seemingly come out of nowhere, but for some reason, config.metadata.dimensions object is undefined in crocodoc.viewer.js for me. I can't seem to find a common thread, but it seems that documents loaded before a certain date work fine, and documents loaded more recently, no longer do so and generate an error. I get the error: crocodoc.viewer.js:5906 Uncaught TypeError: Cannot read property 'width' of undefined
I just tried loading a document on my test machine that I've used dozens of times before for testing, and I get the same error with this one. Any help would be much appreciated!
Edit: Looks like I was running 0.5.5 before. I tried using .10.10 just now, and it seems to dump the raw binary data into the browser instead of the actual file, but no longer throws the error...
Contributor guide
Research direction
Start with crocodoc.viewer.js around line 5906 and inspect why config.metadata.dimensions is missing when width is read. Reproduce the report using the document and version details in the issue, comparing 0.5.5 with 0.10.10. Done means the document loads in the viewer without the undefined-dimensions error or raw binary output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100