| Total Complexity | 5 |
| Complexity/F | 5 |
| Lines of Code | 8 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | export default function translate(lang, str) { |
||
| 2 | var trad = Locales |
||
|
|
|||
| 3 | if(typeof trad[lang] !== 'undefined' && trad[lang] !== null |
||
| 4 | && typeof trad[lang][str] !== 'undefined' && trad[lang][str] !== null) { |
||
| 5 | return trad[lang][str] |
||
| 6 | } |
||
| 7 | return str |
||
| 8 | } |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.