79173854

Date: 2024-11-09 22:57:37
Score: 1
Natty:
Report link

🤔

How are you guaranteeing that the record exists? Undefined is neither in String nor LanguageKey, and I think that's what it's complaining about.

You can fix this by adding an empty check

...
const language = this.languages[langKey];
if(!language) throw Error();
this.needsString(language);
...
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: guest