Skip to content

Commit 1cbe2dc

Browse files
committed
Wrap App on render time.
1 parent 4989bd5 commit 1cbe2dc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/remix/src/client/performance.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,17 +162,16 @@ export function withSentry<P extends Record<string, unknown>, R extends React.FC
162162

163163
isBaseLocation = false;
164164

165+
if (!isRemixV2() && options.wrapWithErrorBoundary) {
166+
// @ts-ignore Setting more specific React Component typing for `R` generic above
167+
// will break advanced type inference done by react router params
168+
return withErrorBoundary(OrigApp, options.errorBoundaryOptions)(props);
169+
}
165170
// @ts-ignore Setting more specific React Component typing for `R` generic above
166171
// will break advanced type inference done by react router params
167172
return <OrigApp {...props} />;
168173
};
169174

170-
if (!isRemixV2() && options.wrapWithErrorBoundary) {
171-
// @ts-ignore Setting more specific React Component typing for `R` generic above
172-
// will break advanced type inference done by react router params
173-
return withErrorBoundary(SentryRoot, options.errorBoundaryOptions);
174-
}
175-
176175
// @ts-ignore Setting more specific React Component typing for `R` generic above
177176
// will break advanced type inference done by react router params
178177
return SentryRoot;

0 commit comments

Comments
 (0)