diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-03 16:20:17 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-03 16:20:17 +0200 |
| commit | 22ca4f38d5680518d98be8d061745da1d02b138f (patch) | |
| tree | 6b3fa4191817a93001f5c326c44d707258f5bde4 /src/rz_core.js | |
| parent | 6d1d801925f4546cc16b56759f5108733fd548ba (diff) | |
rz_core: user removal fallout
Diffstat (limited to 'src/rz_core.js')
| -rw-r--r-- | src/rz_core.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rz_core.js b/src/rz_core.js index b2643f09..0eeb3b78 100644 --- a/src/rz_core.js +++ b/src/rz_core.js @@ -62,11 +62,15 @@ var initDrawingArea = function () { } } - var user_id = $('#user_id').text(); - console.log('found user ID: \'' + user_id + '\''); - graph = new model_graph.Graph(); - graph.set_user(user); + + var user_id = $('#user_id'), + user = user_id.text(); + + if (user_id.length > 0) { + console.log('found user ID: \'' + user + '\''); + graph.set_user(user); + } var el = document.body; vis = d3.select(el).append("svg:svg") |
