Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix(zonespec): Do not crash on error if last task had no data
Browse files Browse the repository at this point in the history
  • Loading branch information
sjelin committed Mar 18, 2016
1 parent 4a4d4f6 commit b9ce59b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/zone-spec/long-stack-trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@
var value = descriptor.value;
descriptor = {
get: function() {
return renderLongStackTrace(parentTask.data[creationTrace],
return renderLongStackTrace(parentTask.data && parentTask.data[creationTrace],
delegateGet ? delegateGet.apply(this): value);
}
};
Object.defineProperty(error, 'stack', descriptor);
} else {
error.stack = renderLongStackTrace(parentTask.data[creationTrace], error.stack);
error.stack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace],
error.stack);
}
}
return parentZoneDelegate.handleError(targetZone, error);
Expand Down Expand Up @@ -130,4 +131,4 @@
}
}
computeIgnoreFrames();
})();
})();

0 comments on commit b9ce59b

Please sign in to comment.