mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix(files_trashbin): Only remove element if loaded
Make sure to only remove elements from file list (while restoring) if the element was added to the file list (might not be added, if the list is scrolling). Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
b1a4b3b764
commit
95acf8a0e9
1 changed files with 4 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue