Skip to content

Commit

Permalink
use optional chaining to simplify code
Browse files Browse the repository at this point in the history
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
  • Loading branch information
JammingBen and mifi authored Jun 9, 2023
1 parent ded405c commit 20714d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const getItemId = (item) => {
}

const getParentPath = (item) => {
return item.parentReference ? item.parentReference.path : null
return item.parentReference?.path
}

const getItemRequestPath = (item) => {
Expand Down

0 comments on commit 20714d1

Please sign in to comment.