mirror of
https://github.com/strapi/strapi.git
synced 2025-09-21 14:31:16 +00:00
refactor
This commit is contained in:
parent
48b81b747d
commit
c0b321c64e
@ -134,13 +134,7 @@ class LocalFileDestinationProvider implements IDestinationProvider {
|
||||
|
||||
if (pipeline && !pipeline.closed) {
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
pipeline
|
||||
.on('close', () => {
|
||||
resolve();
|
||||
})
|
||||
.on('error', (e) => {
|
||||
reject(e);
|
||||
});
|
||||
pipeline.on('close', resolve).on('error', resolve);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user