diff options
| author | Alon Levy <alon@pobox.com> | 2015-02-11 17:56:03 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-02-11 17:56:03 +0200 |
| commit | 6d509d55ecdb94d4bc3ef755c4dccec9c262142b (patch) | |
| tree | 16674ac93072f2a5e8f9c73957127e65fa97c5f9 /src/client | |
| parent | c36b177e05426c9a37e905c7eb65700cf9b69478 (diff) | |
client/textanalysis: fix possible usage of _get_lastnode when undefined
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/textanalysis.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/textanalysis.js b/src/client/textanalysis.js index 9a4cd412..ac829d18 100644 --- a/src/client/textanalysis.js +++ b/src/client/textanalysis.js @@ -8,7 +8,9 @@ var typeindex = 0, node_name_to_type = {}; var _get_lastnode, - get_lastnode = function (editgraph, cursor) { return _get_lastnode(editgraph, cursor); }; + get_lastnode = function (editgraph, cursor) { + return undefined !== _get_lastnode ? _get_lastnode(editgraph, cursor) : null; + }; var sugg_name = {}, id_to_name_map = {}, |
