[ACA-4265]Refactor attachFileFromLocal method

* Refactor attachFileFromLocal method
This commit is contained in:
Cristina Jalba
2021-02-07 11:18:10 +02:00
committed by GitHub
parent f4976a1949
commit 60c1ea9fe6
8 changed files with 113 additions and 22 deletions

View File

@@ -924,7 +924,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
}
onPreselectNodes() {
if (this.data.hasPreselectedRows()) {
if (this.data?.hasPreselectedRows()) {
const preselectedNodes = [...this.isSingleSelectionMode() ? [this.data.getPreselectedRows()[0]] : this.data.getPreselectedRows()];
const selectedNodes = [...this.selection, ...preselectedNodes];