diff options
| author | Alon Levy <alon@pobox.com> | 2015-01-05 14:14:22 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-01-05 14:14:22 +0200 |
| commit | e8634c3ba23f098fd21f6f3cd9389db26b5842f6 (patch) | |
| tree | 65f7719ccefaccae738a293db45f81f21c959c68 /src | |
| parent | b15db93ed00026aa78d7dedcf5688410d4a80fc5 (diff) | |
client/model/graph: add assert on update_node ajax success entry conditions
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/model/graph.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/model/graph.js b/src/client/model/graph.js index 06ca2fdd..4350c664 100644 --- a/src/client/model/graph.js +++ b/src/client/model/graph.js @@ -452,6 +452,9 @@ function Graph(spec) { var on_ajax_success = function(id_to_node_map){ var node_id = node.id; // original node id + + util.assert(id_to_node_map && id_to_node_map[node_id], "bad return value from ajax"); + if (id_to_node_map[node_id].id != node_id){ // TODO: handle incoming ID update util.assert(false, 'update_node: id attr change'); |
