Skip to content

Commit

Permalink
[BUG] error logging an error--need to null-check reason #1610
Browse files Browse the repository at this point in the history
  • Loading branch information
MSNev committed Jul 14, 2021
1 parent 552b046 commit d2fa0ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ export class ApplicationInsights extends BaseTelemetryPlugin implements IAppInsi
const handled = originalOnUnhandledRejection && (originalOnUnhandledRejection.call(_window, error) as any);
if (handled !== true) { // handled could be typeof function
instance._onerror(Exception.CreateAutoException(
error.reason.toString(),
error && error.reason ? error.reason.toString() : error,
_location ? _location.href : "",
0,
0,
Expand Down

0 comments on commit d2fa0ca

Please sign in to comment.