Skip to content

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

@otacke

Description

@otacke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions