@@ -1140,7 +1140,7 @@ AmplitudeClient.prototype.identify = function (identify_obj, opt_callback) {
11401140 }
11411141
11421142 // 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' ) ) {
11441144 identify_obj = _convertProxyObjectToRealObject ( new Identify ( ) , identify_obj ) ;
11451145 }
11461146
@@ -1196,7 +1196,7 @@ AmplitudeClient.prototype.groupIdentify = function (group_type, group_name, iden
11961196 }
11971197
11981198 // 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' ) ) {
12001200 identify_obj = _convertProxyObjectToRealObject ( new Identify ( ) , identify_obj ) ;
12011201 }
12021202
@@ -1524,7 +1524,7 @@ AmplitudeClient.prototype.logRevenueV2 = function logRevenueV2(revenue_obj) {
15241524 }
15251525
15261526 // 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' ) ) {
15281528 revenue_obj = _convertProxyObjectToRealObject ( new Revenue ( ) , revenue_obj ) ;
15291529 }
15301530
0 commit comments