From f054de17170a7f0c3851648d0411cc50b96e1fcd Mon Sep 17 00:00:00 2001 From: Brandon Fergerson Date: Wed, 1 Mar 2023 21:38:23 +0400 Subject: [PATCH] fix: sourceplusplus/sourceplusplus#944 (cherry picked from commit 6b1abd31621723ff6bacfe1accbdcf5f3bf11fe3) --- .../spp/jetbrains/marker/js/detect/endpoint/ExpressEndpoint.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marker/js-marker/src/main/kotlin/spp/jetbrains/marker/js/detect/endpoint/ExpressEndpoint.kt b/marker/js-marker/src/main/kotlin/spp/jetbrains/marker/js/detect/endpoint/ExpressEndpoint.kt index 794308987..88aa83282 100644 --- a/marker/js-marker/src/main/kotlin/spp/jetbrains/marker/js/detect/endpoint/ExpressEndpoint.kt +++ b/marker/js-marker/src/main/kotlin/spp/jetbrains/marker/js/detect/endpoint/ExpressEndpoint.kt @@ -60,7 +60,7 @@ class ExpressEndpoint : EndpointDetector.EndpointNameDetector { return@runReadAction } val router = method.firstChild as JSReferenceExpression - val routerVariable = router.resolve() as JSInitializerOwner? ?: run { + val routerVariable = router.resolve() as? JSInitializerOwner ?: run { promise.complete(emptyList()) return@runReadAction }