File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1167,13 +1167,15 @@ TourCMS.prototype.showCustomer = function(a) {
1167
1167
1168
1168
// Sanitise response, tours is an array if empty
1169
1169
a . processor = function ( response , callback ) {
1170
-
1171
- // Ensure we have an array of custom fields
1172
- if ( typeof response . customer . custom_fields !== "undefined" )
1173
- response . customer . custom_fields . field = [ ] . concat ( response . customer . custom_fields . field ) ;
1174
- else
1175
- response . customer . custom_fields = { field :[ ] } ;
1176
-
1170
+
1171
+ if ( response . error == "OK" && response . customer ) {
1172
+ // Ensure we have an array of custom fields
1173
+ if ( typeof response . customer . custom_fields !== "undefined" )
1174
+ response . customer . custom_fields . field = [ ] . concat ( response . customer . custom_fields . field ) ;
1175
+ else
1176
+ response . customer . custom_fields = { field :[ ] } ;
1177
+ }
1178
+
1177
1179
callback ( response ) ;
1178
1180
1179
1181
} ;
Original file line number Diff line number Diff line change 6
6
" api"
7
7
],
8
8
"homepage" : " https://github.com/tourcms/node-tourcms" ,
9
- "version" : " 1.2.0 " ,
9
+ "version" : " 1.2.1 " ,
10
10
"author" :
" TourCMS <[email protected] > (http://www.tourcms.com)" ,
11
11
"contributors" : [
12
12
" Paul Slugocki <[email protected] > (https://github.com/paulslugocki)"
You can’t perform that action at this time.
0 commit comments