Skip to content

Conversation

rodoch
Copy link
Contributor

@rodoch rodoch commented Mar 9, 2020

Minor PR:

The current setup for the 'star list' in Screenful.Navigator presumes that entry IDs will always be integers and parses them with the parseInt() function. We have some situations in Gaois/Ardán (e.g. Aarne-Thompson type classifications) where IDs are alphanumeric strings such as 0275 or 1450** and this integer parsing causes invalid IDs to be passed to the server.

This PR introduces a simple check to determine whether the entry ID is a numeric string, in which case it is parsed as an integer, or whether it contains non-numeric characters, in which case it is left unchanged.

Tested in production. I tried to think of any negative consequences this might have but haven't come up with any so far. Moltaí ar bith, abair liom!

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

Successfully merging this pull request may close these issues.

1 participant