Index: gc_lang/fr/webext/content_scripts/lxg_content.js ================================================================== --- gc_lang/fr/webext/content_scripts/lxg_content.js +++ gc_lang/fr/webext/content_scripts/lxg_content.js @@ -26,19 +26,17 @@ this._xContentNode.appendChild(createNode("div", {className: sClass, textContent: sText})); }, addListOfTokens: function (lTokens) { try { - let xNodeDiv = createNode("div", {className: "grammalecte_lxg_list_of_tokens"}); - if (lTokens.length > 0) { + if (lTokens) { + let xNodeDiv = createNode("div", {className: "grammalecte_lxg_list_of_tokens"}); for (let oToken of lTokens) { xNodeDiv.appendChild(this._createTokenNode(oToken)); } - } else { - xNodeDiv.appendChild(document.createTextNode("Aucun token connu détecté.")); + this._xContentNode.appendChild(xNodeDiv); } - this._xContentNode.appendChild(xNodeDiv); } catch (e) { showError(e); } },