Skip to content

Provide for non-integer entry IDs in star list #3

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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