Prevent empty chapter updates on migration
In case there were no chapters to migrate the read or bookmark status, a request with an empty list was sent to the server. This caused an exception on the server which resulted in a request failure which at the end caused the migration to fail
This commit is contained in:
@@ -378,8 +378,9 @@ export class Mangas {
|
||||
});
|
||||
|
||||
await Promise.all([
|
||||
requestManager.updateChapters(readChapters, { isRead: true }).response,
|
||||
requestManager.updateChapters(bookmarkedChapters, { isBookmarked: true }).response,
|
||||
readChapters.length && requestManager.updateChapters(readChapters, { isRead: true }).response,
|
||||
bookmarkedChapters.length &&
|
||||
requestManager.updateChapters(bookmarkedChapters, { isBookmarked: true }).response,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user