Skip to content

Commit 4c97ee9

Browse files
author
Luca Forstner
committed
Preserve enumerable property
1 parent 7f0c91b commit 4c97ee9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/nextjs/src/config/loaders/dataFetchersLoader.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ export default function wrapDataFetchersLoader(this: LoaderThis<LoaderOptions>,
134134
Object.defineProperty(
135135
_sentry_default,
136136
'getInitialProps',
137-
{ value: withSentryGetInitialProps(_sentry_default.getInitialProps) }
137+
{
138+
...Object.getOwnPropertyDescriptor(_sentry_default, 'getInitialProps'),
139+
value: withSentryGetInitialProps(_sentry_default.getInitialProps)
140+
}
138141
);
139142
export default _sentry_default;`;
140143
}

0 commit comments

Comments
 (0)