Skip to content

Commit 14cbad3

Browse files
committed
Streamline response handling
1 parent a30cf99 commit 14cbad3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/DuckChatWebViewActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ class DuckChatWebViewActivity : DuckDuckGoActivity() {
141141
when (featureName) {
142142
DUCK_CHAT_FEATURE_NAME -> {
143143
appCoroutineScope.launch(dispatcherProvider.io()) {
144-
val response = duckChatJSHelper.processJsCallbackMessage(featureName, method, id, data)
145-
response?.let {
144+
duckChatJSHelper.processJsCallbackMessage(featureName, method, id, data)?.let { response ->
146145
withContext(dispatcherProvider.main()) {
147146
contentScopeScripts.onResponse(response)
148147
}

0 commit comments

Comments
 (0)