diff --git a/src/main/kotlin/com/eny/i18n/plugin/parser/ReactUseTranslationHookExtractor.kt b/src/main/kotlin/com/eny/i18n/plugin/parser/ReactUseTranslationHookExtractor.kt index a692e78b..5a277e48 100644 --- a/src/main/kotlin/com/eny/i18n/plugin/parser/ReactUseTranslationHookExtractor.kt +++ b/src/main/kotlin/com/eny/i18n/plugin/parser/ReactUseTranslationHookExtractor.kt @@ -39,6 +39,6 @@ class ReactUseTranslationHookExtractor: KeyExtractor { private fun resolveHook(literal: PsiElement): JSCallExpression? { return resolveTranslationFunctionDefinition(literal) ?.let { resolveDestructuringElement(it) } - ?.let { it.initializer as JSCallExpression} + ?.let { it.initializer as? JSCallExpression} } } \ No newline at end of file