Skip to content

Commit

Permalink
IJMP-1568 AllocateLikeAction Empty list doesn't contain element at in…
Browse files Browse the repository at this point in the history
…dex 0
  • Loading branch information
Katsiaryna Tsytsenia committed Apr 2, 2024
1 parent a50c3aa commit d13a1c7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ class AllocateLikeAction : AllocateActionBase() {
return
}
val selected = view.mySelectedNodesData
val entityAttributes = selected[0].attributes
e.presentation.isEnabledAndVisible = selected.size == 1
&& entityAttributes is RemoteDatasetAttributes
&& !entityAttributes.isMigrated
val entityAttributes = if (selected.size == 1) selected[0].attributes else null
e.presentation.isEnabledAndVisible = entityAttributes != null
&& entityAttributes is RemoteDatasetAttributes
&& !entityAttributes.isMigrated
e.presentation.icon = IconUtil.addText(AllIcons.FileTypes.Any_type, "DS")
}

Expand Down

0 comments on commit d13a1c7

Please sign in to comment.