File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
packages/nextjs/src/config Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -140,11 +140,8 @@ async function addSentryToEntryProperty(
140
140
// we know is that it won't have gotten *simpler* in form, so we only need to worry about the object and function
141
141
// options. See https://webpack.js.org/configuration/entry-context/#entry.
142
142
143
- let newEntryProperty = currentEntryProperty ;
144
- if ( typeof currentEntryProperty === 'function' ) {
145
- newEntryProperty = await currentEntryProperty ( ) ;
146
- }
147
- newEntryProperty = newEntryProperty as EntryPropertyObject ;
143
+ const newEntryProperty =
144
+ typeof currentEntryProperty === 'function' ? await currentEntryProperty ( ) : { ...currentEntryProperty } ;
148
145
149
146
// Add a new element to the `entry` array, we force webpack to create a bundle out of the user's
150
147
// `sentry.server.config.js` file and output it to `SERVER_INIT_LOCATION`. (See
You can’t perform that action at this time.
0 commit comments