Fix bug when chain in the upper level is not found
This commit is contained in:
committed by
Yan Zhulanow
parent
56a783b858
commit
4cb8cc3653
+1
-1
@@ -40,7 +40,7 @@ abstract class KotlinChainBuilderBase(private val transformer: ChainTransformer<
|
||||
private fun toUpperLevel(element: PsiElement): PsiElement? {
|
||||
var current = element.parent
|
||||
|
||||
while (current != null && !(current is KtLambdaExpression || current is KtAnonymousInitializer)) {
|
||||
while (current != null && !(current is KtLambdaExpression || current is KtAnonymousInitializer || current is KtObjectDeclaration)) {
|
||||
current = current.parent
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user