152 | const jobs = !!((_a = resume.profession) === null || _a === void 0 ? void 0 : _a.length) ?
153 | CARGOS OCUPADOS: ${convertArrayToText(professionDescription(resume))}. enter code here 154 | TEMPO DE EXPERIÊNCIA PROFISSIONAL TOTAL: ${literalTime(normalizedWorTime(resume))}. : "";
155 | const languages = !!resume.language.length ?
IDIOMAS: ${convertArrayToText(getLanguageText(resume))}.: ""; 156 | const additional =PUBLICAÇÕES: ${publicationsText(resume)}. PREMIAÇÕES: ${awardsText(resume)}; 157 | return education + jobs + languages + additional; 158 | }
I have this error in my code, it came up suddenly, I've searched several forums but found nothing relevant.
Within Visual Studio Code, it gives the following error: "Could not open utils.js in the editor."
When running on Windows, file names are checked against a whitelist to protect against remote code execution attacks. File names may consist only of alphanumeric characters (all languages), periods, dashes, slashes, and underscores."
152 | const jobs = !!((_a = resume.profession) === null || _a === void 0 ? void 0 : _a.length) ?
153 | `CARGOS OCUPADOS: ${convertArrayToText(professionDescription(resume))}.
154 | TEMPO DE EXPERIÊNCIA PROFISSIONAL TOTAL: ${literalTime(normalizedWorTime(resume))}. ` : "";
> 155 | const languages = !!resume.language.length ? ` IDIOMAS: ${convertArrayToText(getLanguageText(resume))}. ` : "";
156 | const additional = `PUBLICAÇÕES: ${publicationsText(resume)}. PREMIAÇÕES: ${awardsText(resume)}`;
157 | return education + jobs + languages + additional;
158 | }
Looks like !!resume.language.length is failing because the language property is null. You could try optional chaining.
const resume = {language: null};
const languages = !!resume.language?.length;
console.log(languages);