Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application crashes when selecting a Narrative in documentation example #217

Open
francamps opened this issue Jul 24, 2021 · 0 comments
Open

Comments

@francamps
Copy link
Contributor

Narratives makes application crash when following documentation for Timemap + Datasheet.

Environment

In local development.
For data source, I'm running the datasheet locally with the example sheet in https://github.com/forensic-architecture/datasheet-server/blob/main/data/timemap_data.xlsx, which contains some example narratives.

In timemap, I'm rendering everything correctly. However, when going into narratives, the application crashes (black screen).
I've cloned the repo from the latest commit (32feff8) .

Current Behavior

When opening the menu by clicking on Narratives on the left tool bar and clicking on one of the examples, the application goes black and crashes.

The following line is missing a check on load:
https://github.com/forensic-architecture/timemap/blob/main/src/components/CardStack.jsx#L29

const cardScroll = this.refs[this.props.narrative.current].current

This line finds this.props.narrative undefined, and so crashes.

Expected Behavior

If undefined, handle gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant