fix: recall not working for NPS question (#5895)

This commit is contained in:
Dhruwang Jariwala
2025-05-28 15:14:55 +05:30
committed by GitHub
parent d9ca64da54
commit 10ccc20b53
+2 -2
View File
@@ -48,7 +48,7 @@ export const replaceRecallInfo = (
}
// Fetching value from responseData or attributes based on recallItemId
if (responseData[recallItemId]) {
if (responseData[recallItemId] !== undefined) {
value = (responseData[recallItemId] as string) ?? fallback;
}
@@ -62,7 +62,7 @@ export const replaceRecallInfo = (
}
// Replace the recallInfo in the text with the obtained or fallback value
modifiedText = modifiedText.replace(recallInfo, value || fallback);
modifiedText = modifiedText.replace(recallInfo, value?.toString() || fallback);
}
return modifiedText;