Merge pull request #40606 from nextcloud/fix/trashbin-should-not-throw-while-restoring

[stable26] Do not throw while restoring unloaded files list entries
This commit is contained in:
Ferdinand Thiessen 2023-09-25 10:06:19 +02:00 committed by GitHub
commit 3970b36bb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -172,7 +172,10 @@ import PQueue from 'p-queue'
var $el
for (var i = 0; i < files.length; i++) {
$el = this.remove(OC.basename(files[i]), { updateSummary: false })
this.fileSummary.remove({ type: $el.attr('data-type'), size: $el.attr('data-size') })
// Only remove element if already loaded (might be unloaded if scrollable list)
if ($el) {
this.fileSummary.remove({ type: $el.attr('data-type'), size: $el.attr('data-size') })
}
}
this.fileSummary.update()
this.updateEmptyContent()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long