Skip to content

Commit 51dc43e

Browse files
committed
fix(actions): remove unnecessary null check
Remove unnecessary null check for editor.selectionModel in AutoCrudAction.kt.
1 parent 407a45c commit 51dc43e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/src/main/kotlin/cc/unitmesh/idea/actions/AutoCrudAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AutoCrudAction : ChatBaseIntention() {
2626
if (file.language !is JavaLanguage) return false
2727

2828
val isEnvironmentAvailable = super.isAvailable(project, editor, file)
29-
return isEnvironmentAvailable && editor.selectionModel?.hasSelection() == true
29+
return isEnvironmentAvailable && editor.selectionModel.hasSelection()
3030
}
3131

3232
override fun invoke(project: Project, editor: Editor?, file: PsiFile?) {

0 commit comments

Comments
 (0)