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