Skip to content

Commit d67f859

Browse files
authored
Merge pull request nextcloud#40610 from nextcloud/backport/40606/stable25
[stable25] Do not throw while restoring unloaded files list entries
2 parents c125984 + f452ef7 commit d67f859

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

apps/files_trashbin/src/filelist.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@
168168
var $el
169169
for (var i = 0; i < files.length; i++) {
170170
$el = this.remove(OC.basename(files[i]), { updateSummary: false })
171-
this.fileSummary.remove({ type: $el.attr('data-type'), size: $el.attr('data-size') })
171+
// Only remove element if already loaded (might be unloaded if scrollable list)
172+
if ($el) {
173+
this.fileSummary.remove({ type: $el.attr('data-type'), size: $el.attr('data-size') })
174+
}
172175
}
173176
this.fileSummary.update()
174177
this.updateEmptyContent()

0 commit comments

Comments
 (0)