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
Closes #281
  • Loading branch information
sjelin authored and mhevery committed Mar 21, 2016
1 parent 1787339 commit 0dba019
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 0dba019

Please sign in to comment.