File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
components/zoho_survey/sources/new-survey-response Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,15 @@ export default {
43
43
recursiveSearch ( obj ) ;
44
44
return labels ;
45
45
} ,
46
+ formatValue ( value ) {
47
+ return typeof value === "string"
48
+ ? decode ( value )
49
+ : Array . isArray ( value )
50
+ ? value . map ( ( v ) => v
51
+ ? decode ( v )
52
+ : "" )
53
+ : "" ;
54
+ } ,
46
55
async formatResponse ( body ) {
47
56
const { variables } = await this . zohoSurvey . listSurveyFields ( {
48
57
portalId : this . portalId ,
@@ -63,15 +72,9 @@ export default {
63
72
response [ key ] = labels [ key ]
64
73
? {
65
74
label : decode ( labels [ key ] ) ,
66
- value : typeof value === "string"
67
- ? decode ( value )
68
- : Array . isArray ( value )
69
- ? value . map ( ( v ) => v
70
- ? decode ( v )
71
- : "" )
72
- : "" ,
75
+ value : this . formatValue ( value ) ,
73
76
}
74
- : decode ( value ) ;
77
+ : this . formatValue ( value ) ;
75
78
}
76
79
for ( const [
77
80
key ,
You can’t perform that action at this time.
0 commit comments