Skip to content

Commit 8919cc7

Browse files
logaretmJPeer264
authored andcommitted
fix: correctly priortize the new option
1 parent f338983 commit 8919cc7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/nextjs/src/config/withSentryConfig/getFinalConfigObjectUtils.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,14 @@ export function maybeCreateRouteManifest(
9898
);
9999
}
100100

101-
// Check if manifest injection is disabled (new option takes precedence)
101+
// If explicitly disabled, skip
102+
if (userSentryOptions.routeManifestInjection === false) {
103+
return undefined;
104+
}
105+
106+
// Still check the deprecated option if the new option is not set
102107
// eslint-disable-next-line deprecation/deprecation
103-
if (userSentryOptions.routeManifestInjection === false || userSentryOptions.disableManifestInjection) {
108+
if (userSentryOptions.routeManifestInjection === undefined && userSentryOptions.disableManifestInjection) {
104109
return undefined;
105110
}
106111

0 commit comments

Comments
 (0)