@highlight-run/react
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -116,4 +116,4 @@ "use strict"; | ||
// esbuild-css-modules-plugin-namespace:/tmp/tmp-1210339-lHNvble0W1ND/highlight-react/src/components/ReportDialog/styles.module.css.js | ||
var digest = "3450afe68e09c19c62da3175e7f6043236ca1b7e029886ddfaa4a760f975e778"; | ||
// esbuild-css-modules-plugin-namespace:/tmp/tmp-3208-N6p1R7Up4TC8/highlight-react/src/components/ReportDialog/styles.module.css.js | ||
var digest = "2f735a0e3c9a6ee703f650c3b0c9d25d75e14c779d8a9e548eb4864ea722c9cc"; | ||
var css = `._container_18ep0_1 { | ||
@@ -561,5 +561,5 @@ --brand-color: #744ed4; | ||
this.setState(__spreadProps(__spreadValues({}, this.state), { showingDialog: false })); | ||
if (this.props.onAfterReportDialogCancelHandler) { | ||
this.props.onAfterReportDialogCancelHandler(); | ||
} | ||
(this.props.onAfterReportDialogCancelHandler || (() => { | ||
window.location.href = window.location.origin; | ||
}))(); | ||
}; | ||
@@ -577,3 +577,3 @@ this.onReportDialogSubmitHandler = () => { | ||
} | ||
captureReactErrorBoundaryError(error, errorInfo.componentStack); | ||
captureReactErrorBoundaryError(error, errorInfo); | ||
if (onError) { | ||
@@ -643,11 +643,11 @@ onError(error, errorInfo.componentStack); | ||
}; | ||
function captureReactErrorBoundaryError(error, componentStack) { | ||
const errorBoundaryError = new Error(` ${error.message}`); | ||
errorBoundaryError.name = `React ErrorBoundary ${error.name}`; | ||
errorBoundaryError.stack = error.stack; | ||
const componentName = getComponentNameFromStack(componentStack); | ||
function captureReactErrorBoundaryError(error, errorInfo) { | ||
const component = getComponentNameFromStack(errorInfo.componentStack); | ||
if (!window.H) { | ||
console.error( | ||
errorBoundaryError, | ||
`${componentName ? `ErrorBoundary ${componentName}` : "HighlightErrorBoundary"}` | ||
console.warn("You need to install highlight.run."); | ||
} else { | ||
window.H.consumeError( | ||
error, | ||
void 0, | ||
component ? { component } : void 0 | ||
); | ||
@@ -654,0 +654,0 @@ } |
{ | ||
"name": "@highlight-run/react", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "The official Highlight SDK for React", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
46900
5
1384