Index: gc_lang/fr/tb/content/lex_editor.js ================================================================== --- gc_lang/fr/tb/content/lex_editor.js +++ gc_lang/fr/tb/content/lex_editor.js @@ -55,11 +55,11 @@ this.xTable = document.getElementById(sNodeId); this.nColumn = lColumn.length; this.lColumn = lColumn; this.lColumnWidth = lColumnWidth; this.xProgressBar = document.getElementById(sProgressBarId); - this.xNumEntry = document.getElementById(sResultId); + this.xNumEntry = sResultId ? document.getElementById(sResultId) : null; this.iEntryIndex = 0; this.lEntry = []; this.nEntry = 0 this._createHeader(); } @@ -414,11 +414,11 @@ } } const oBinaryDict = { - + oIBDAWG: null, load: async function () { let sJSON = await oFileHandler.loadFile("fr.personal.json"); this._load(sJSON); @@ -427,11 +427,11 @@ _load: function (sJSON, bSave=false) { //console.log("_load"); if (sJSON) { try { let oJSON = JSON.parse(sJSON); - this.oIBDAWG = new IBDAWG(oJSON); + this.oIBDAWG = new IBDAWG(oJSON); } catch (e) { this.setDictData(0, "#Erreur. Voir la console."); console.error(e); return; @@ -440,11 +440,11 @@ oFileHandler.saveFile("fr.personal.json", sJSON); } let lEntry = []; for (let aRes of this.oIBDAWG.select()) { lEntry.push(aRes); - } + } oLexiconTable.fill(lEntry); this.setDictData(this.oIBDAWG.nEntry, this.oIBDAWG.sDate); enableElement("export_button"); } else { this.setDictData(0, "[néant]"); Index: graphspell-js/spellchecker.js ================================================================== --- graphspell-js/spellchecker.js +++ graphspell-js/spellchecker.js @@ -50,11 +50,11 @@ if (!dictionary) { return null; } try { if (typeof(ibdawg) !== 'undefined') { - return new ibdawg.IBDAWG(dictionary); // dictionary can be a filename or a JSON object + return new ibdawg.IBDAWG(dictionary, sPath); // dictionary can be a filename or a JSON object } else { return new IBDAWG(dictionary, sPath); // dictionary can be a filename or a JSON object } } catch (e) {