Grammalecte  Check-in [ae469535bc]

Overview
Comment:[graphspell][js][bug] spellchecker: dictionary not always a filename string
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | graphspell | multid
Files: files | file ages | folders
SHA3-256: ae469535bca09f05f6587bcdb9c6348a0fe3e19bd4cc9904aae3734d4e248168
User & Date: olr on 2018-02-17 11:31:08
Other Links: branch diff | manifest | tags
Context
2018-02-18
10:13
[tb] merge trunk: fix bugs check-in: bce8dea5b0 user: olr tags: multid, tb
2018-02-17
11:50
[build][graphspell][core] build with options to integrate extended and personal dictionaries check-in: e0d79cdbf4 user: olr tags: build, core, graphspell, trunk
11:31
[graphspell][js][bug] spellchecker: dictionary not always a filename string check-in: ae469535bc user: olr tags: graphspell, multid
10:13
[graphspell] spellchecker: handling exception when loading dictionary file check-in: c075441c64 user: olr tags: graphspell, multid
Changes

Modified graphspell-js/spellchecker.js from [2310ecd9b2] to [567dbb14f5].

    47     47               if (typeof(require) !== 'undefined') {
    48     48                   return new ibdawg.IBDAWG(dictionary);  // dictionary can be a filename or a JSON object
    49     49               } else {
    50     50                   return new IBDAWG(dictionary, sPath);  // dictionary can be a filename or a JSON object
    51     51               }
    52     52           }
    53     53           catch (e) {
           54  +            let sfDictionary = (typeof(dictionary) == "string") ? dictionary : dictionary.sLangName + "/" + dictionary.sFileName;
    54     55               if (bNecessary) {
    55     56                   throw "Error: <" + sfDictionary + "> not loaded. " + e.message;
    56     57               }
    57     58               console.log("Error: <" + sfDictionary + "> not loaded.")
    58     59               console.log(e.message);
    59     60               return null;
    60     61           }