Skip to content

Commit

Permalink
Tracing layer: add additional error reporting to active node promise
Browse files Browse the repository at this point in the history
Users reported seeing an error with retrievingthe active node from the tracing
layer. The root of this problem is still unclear, but this additional error
check may help to discover it.
  • Loading branch information
tomka committed Sep 2, 2016
1 parent a6e0fcd commit d855456
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django/applications/catmaid/static/js/widgets/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ SkeletonAnnotations.atn.set = function(node, stack_viewer_id) {
SkeletonAnnotations.atn.promise = function()
{
var overlay = SkeletonAnnotations.getTracingOverlay(this.stack_viewer_id);
var nodePromise = overlay.promiseNode(overlay.nodes[this.id]);
var node = overlay.nodes[this.id];
if (!node) {
return Promise.reject("Couldn't find node " + this.id + " in tracing layer");
}
var nodePromise = overlay.promiseNode(node);
var isNewSkeleton = !this.skeleton_id;

return nodePromise.then((function(result) {
Expand Down

0 comments on commit d855456

Please sign in to comment.