Skip to content

Commit

Permalink
Merge pull request #13117 from keymanapp/fix/common/13116-handle-unde…
Browse files Browse the repository at this point in the history
…fined-input-in-langtags-lookup

fix(common): handle undefined input in `@keymanapp/langtags` lookups
  • Loading branch information
mcdurdin authored Feb 4, 2025
2 parents 5bf2cbc + 5fea5b3 commit aec7bee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/web/langtags/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function preinit(): void {
* @returns LangTag or undefined if not found
*/
function getLangtagByTag(tag: string): LangTag {
return langtagsByTag.get(tag.toLowerCase());
return langtagsByTag.get(tag?.toLowerCase());
}

preinit();
Expand Down

0 comments on commit aec7bee

Please sign in to comment.