fix: compile error

This commit is contained in:
Carl-Robert Linnupuu 2025-02-03 18:02:53 +00:00
parent 30fa80ef96
commit 7ea1dd5d36

View file

@ -187,8 +187,9 @@ class SelectionTagPanel(
fun getDefaultSelectionTagDetails(project: Project): TagDetails {
val editor = getSelectedEditor(project)
val selectionModel = editor?.selectionModel
return if (selectionModel?.hasSelection() == true) {
SelectionTagDetails((editor as? EditorEx)?.virtualFile, selectionModel)
val file = (editor as? EditorEx)?.virtualFile
return if (selectionModel?.hasSelection() == true && file != null) {
SelectionTagDetails(file, selectionModel)
} else {
EmptyTagDetails()
}