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

Default value check is too greedy and raises issues in practice #112

Open
otacke opened this issue Aug 7, 2024 · 0 comments
Open

Default value check is too greedy and raises issues in practice #112

otacke opened this issue Aug 7, 2024 · 0 comments

Comments

@otacke
Copy link
Contributor

otacke commented Aug 7, 2024

In

h5p-cli/assets/utils/h5p.js

Lines 1021 to 1023 in b2667b3

if (languageCodes.indexOf(value.toLowerCase()) !== -1) { // language codes
return true;
}

default fields that contain one of the language codes only will be purged. This is too greedy and also hits the simple English word "No" that happens to occur in GameMap as a translatable word, cmp. https://github.com/otacke/h5p-game-map/blob/master/semantics.json#L1065

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