Skip to content

Commit

Permalink
Use typescript ?. operator
Browse files Browse the repository at this point in the history
  • Loading branch information
adomi committed Feb 2, 2021
1 parent 2c8b28a commit 8e3db88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
}

hasPreselectNodes(): boolean {
return this.preselectedNodes && this.preselectedNodes.length > 0;
return this.preselectedNodes?.length > 0;
}

isSingleSelectionMode(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class ShareDataTableAdapter implements DataTableAdapter {

const options: Intl.CollatorOptions = {};

if (sorting?.key && rows?.length > 0) {
if (sorting?.key && rows?.length) {

if (sorting.key.includes('sizeInBytes') || sorting.key === 'name') {
options.numeric = true;
Expand Down

0 comments on commit 8e3db88

Please sign in to comment.