Provide for non-integer entry IDs in star list #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Minor PR:
The current setup for the 'star list' in
Screenful.Navigator
presumes that entry IDs will always be integers and parses them with theparseInt()
function. We have some situations in Gaois/Ardán (e.g. Aarne-Thompson type classifications) where IDs are alphanumeric strings such as0275
or1450**
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!