Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/amplitude-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ AmplitudeClient.prototype.identify = function (identify_obj, opt_callback) {
}

// if identify input is a proxied object created by the async loading snippet, convert it into an identify object
if (Object.prototype.hasOwnProperty.call(identify_obj, '_q')) {
if (type(identify_obj) === 'object' && Object.prototype.hasOwnProperty.call(identify_obj, '_q')) {
identify_obj = _convertProxyObjectToRealObject(new Identify(), identify_obj);
}

Expand Down Expand Up @@ -1196,7 +1196,7 @@ AmplitudeClient.prototype.groupIdentify = function (group_type, group_name, iden
}

// if identify input is a proxied object created by the async loading snippet, convert it into an identify object
if (Object.prototype.hasOwnProperty.call(identify_obj, '_q')) {
if (type(identify_obj) === 'object' && Object.prototype.hasOwnProperty.call(identify_obj, '_q')) {
identify_obj = _convertProxyObjectToRealObject(new Identify(), identify_obj);
}

Expand Down Expand Up @@ -1524,7 +1524,7 @@ AmplitudeClient.prototype.logRevenueV2 = function logRevenueV2(revenue_obj) {
}

// if revenue input is a proxied object created by the async loading snippet, convert it into an revenue object
if (Object.prototype.hasOwnProperty.call(revenue_obj, '_q')) {
if (type(revenue_obj) === 'object' && Object.prototype.hasOwnProperty.call(revenue_obj, '_q')) {
revenue_obj = _convertProxyObjectToRealObject(new Revenue(), revenue_obj);
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var logLevels = {
let logLevel = logLevels.WARN;

const setLogLevel = function setLogLevel(logLevelName) {
if (Object.prototype.hasOwnProperty.call(logLevels, logLevel)) {
if (Object.prototype.hasOwnProperty.call(logLevels, logLevelName)) {
logLevel = logLevels[logLevelName];
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/amplitude-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,7 @@ describe('AmplitudeClient', function () {
assert.equal(message, 'success');
});

it.only('should run the callback even with a dropped unsent event', function () {
it('should run the callback even with a dropped unsent event', function () {
amplitude.init(apiKey, null, { savedMaxCount: 1 });
var counter = 0;
var value = null;
Expand Down