Skip to content

Commit 6545cef

Browse files
crokitarenonick87
andauthored
Update lib/js/src/manager/screen/utils/_PresentAlertOperation.js
Co-authored-by: renonick87 <renonick87@gmail.com>
1 parent 83302af commit 6545cef

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

lib/js/src/manager/screen/utils/_PresentAlertOperation.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,13 @@ class _PresentAlertOperation extends _Task {
233233
console.log('All alert images uploaded');
234234
}
235235

236-
const artworkResults = [];
236+
const artworkNamesSuccessfullyUploaded = [];
237237
for (let index = 0; index < successes.length; index++) {
238-
artworkResults.push({
239-
artwork: artworksToBeUploaded[index],
240-
success: successes[index],
241-
});
242-
}
243238
// only keep artworks that have been uploaded successfully by the file manager
244-
const artworkNamesSuccessfullyUploaded = artworkResults.filter(result => result.success).map(result => result.artwork.getName());
239+
if (successes[index]) {
240+
artworkNamesSuccessfullyUploaded.push(artworksToBeUploaded[index].getName());
241+
}
242+
}
245243
if (artworkNamesSuccessfullyUploaded.includes(this._alertView.getIcon().getName())) {
246244
this._alertIconUploaded = true;
247245
}

0 commit comments

Comments
 (0)