File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
packages/bundler-plugin-core/src Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ interface FileDeletionPlugin {
1111 waitUntilSourcemapFileDependenciesAreFreed : ( ) => Promise < void > ;
1212 sentryScope : Scope ;
1313 sentryClient : Client ;
14- filesToDeleteAfterUpload : string | string [ ] | Promise < string | string [ ] > | undefined ;
14+ filesToDeleteAfterUpload : string | string [ ] | Promise < string | string [ ] | undefined > | undefined ;
1515 logger : Logger ;
1616}
1717
@@ -27,9 +27,8 @@ export function fileDeletionPlugin({
2727 name : "sentry-file-deletion-plugin" ,
2828 async writeBundle ( ) {
2929 try {
30- if ( filesToDeleteAfterUpload !== undefined ) {
31- const filesToDelete = await filesToDeleteAfterUpload ;
32-
30+ const filesToDelete = await filesToDeleteAfterUpload ;
31+ if ( filesToDelete !== undefined ) {
3332 const filePathsToDelete = await glob ( filesToDelete , {
3433 absolute : true ,
3534 nodir : true ,
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ export interface Options {
138138 *
139139 * Use the `debug` option to print information about which files end up being deleted.
140140 */
141- filesToDeleteAfterUpload ?: string | string [ ] | Promise < string | string [ ] > ;
141+ filesToDeleteAfterUpload ?: string | string [ ] | Promise < string | string [ ] | undefined > ;
142142 } ;
143143
144144 /**
You can’t perform that action at this time.
0 commit comments