Skip to content

Commit f300c65

Browse files
committed
Wrap App on render time.
1 parent 15bf899 commit f300c65

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/remix/src/client/performance.tsx

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

163163
isBaseLocation = false;
164164

165-
// @ts-expect-error Setting more specific React Component typing for `R` generic above
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+
}
170+
// @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-
176-
// @ts-expect-error Setting more specific React Component typing for `R` generic above
175+
// @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;
179178
}

0 commit comments

Comments
 (0)