@@ -1140,7 +1140,7 @@ AmplitudeClient.prototype.identify = function (identify_obj, opt_callback) {
1140
1140
}
1141
1141
1142
1142
// if identify input is a proxied object created by the async loading snippet, convert it into an identify object
1143
- if ( Object . prototype . hasOwnProperty . call ( identify_obj , '_q' ) ) {
1143
+ if ( type ( identify_obj ) === 'object' && Object . prototype . hasOwnProperty . call ( identify_obj , '_q' ) ) {
1144
1144
identify_obj = _convertProxyObjectToRealObject ( new Identify ( ) , identify_obj ) ;
1145
1145
}
1146
1146
@@ -1196,7 +1196,7 @@ AmplitudeClient.prototype.groupIdentify = function (group_type, group_name, iden
1196
1196
}
1197
1197
1198
1198
// if identify input is a proxied object created by the async loading snippet, convert it into an identify object
1199
- if ( Object . prototype . hasOwnProperty . call ( identify_obj , '_q' ) ) {
1199
+ if ( type ( identify_obj ) === 'object' && Object . prototype . hasOwnProperty . call ( identify_obj , '_q' ) ) {
1200
1200
identify_obj = _convertProxyObjectToRealObject ( new Identify ( ) , identify_obj ) ;
1201
1201
}
1202
1202
@@ -1524,7 +1524,7 @@ AmplitudeClient.prototype.logRevenueV2 = function logRevenueV2(revenue_obj) {
1524
1524
}
1525
1525
1526
1526
// if revenue input is a proxied object created by the async loading snippet, convert it into an revenue object
1527
- if ( Object . prototype . hasOwnProperty . call ( revenue_obj , '_q' ) ) {
1527
+ if ( type ( revenue_obj ) === 'object' && Object . prototype . hasOwnProperty . call ( revenue_obj , '_q' ) ) {
1528
1528
revenue_obj = _convertProxyObjectToRealObject ( new Revenue ( ) , revenue_obj ) ;
1529
1529
}
1530
1530
0 commit comments