eucp-project / storyboards

Simple web application to show example use cases with some interactivity. (visitors via old url will be redirected to the website with new url)
https://eucp-project.github.io/storyboards
Other
6 stars 5 forks source link

Fix cryptic 'endswith' error when an image is not set for chapter #89

Closed raar1 closed 1 year ago

raar1 commented 1 year ago

An unhelpful error was displayed in the browser if the 'Chapter' line in a story's markdown did not specify an image file.

For example: :::Chapter{headline="Citation"} instead of :::Chapter{headline="Citation" image="ghlogo.png"}

Firefox gave a somewhat understandable error but in Chromium it was not so obvious. I have added a slightly more graceful error handling, in which the page is still able to render, but the media pane div displays an error and a potential fix.

Tested in both firefox 109.0.1 and chromium 109.0.5414.119

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication