Index: gc_lang/fr/webext/content_scripts/panel_gc.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel_gc.js +++ gc_lang/fr/webext/content_scripts/panel_gc.js @@ -359,16 +359,18 @@ if (xNodeErr.dataset.gc_message.includes(" #")) { xNodeErr.dataset.line_id = oErr['sLineId']; xNodeErr.dataset.rule_id = oErr['sRuleId']; } xNodeErr.dataset.suggestions = oErr["aSuggestions"].join("|"); - let sHue = oErr["aColor"][0].toString(); - let sSat = oErr["aColor"][1].toString(); - let sLum = oErr["aColor"][2].toString(); - xNodeErr.style.color = `hsl(${sHue}, ${sSat}%, 15%)`; - xNodeErr.style.backgroundColor = `hsl(${sHue}, ${sSat}%, 85%)`; - xNodeErr.style.borderBottom = `solid 2px hsl(${sHue}, ${sSat}%, ${sLum}%)`; + if (oErr.hasOwnProperty("aColor")) { + let sHue = oErr["aColor"][0].toString(); + let sSat = oErr["aColor"][1].toString(); + let sLum = oErr["aColor"][2].toString(); + xNodeErr.style.color = `hsl(${sHue}, ${sSat}%, 15%)`; + xNodeErr.style.backgroundColor = `hsl(${sHue}, ${sSat}%, 85%)`; + xNodeErr.style.borderBottom = `solid 2px hsl(${sHue}, ${sSat}%, ${sLum}%)`; + } } else { xNodeErr.className = "grammalecte_spellerror"; } return xNodeErr;