@@ -773,7 +773,7 @@ AmplitudeClient.prototype.saveEvents = function saveEvents() {
773773 */
774774AmplitudeClient . prototype . setDomain = function setDomain ( domain ) {
775775 if ( this . _shouldDeferCall ( ) ) {
776- return this . _q . push ( [ 'setDomain' , domain ] ) ;
776+ return this . _q . push ( [ 'setDomain' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
777777 }
778778
779779 if ( ! utils . validateInput ( domain , 'domain' , 'string' ) ) {
@@ -802,7 +802,7 @@ AmplitudeClient.prototype.setDomain = function setDomain(domain) {
802802 */
803803AmplitudeClient . prototype . setUserId = function setUserId ( userId ) {
804804 if ( this . _shouldDeferCall ( ) ) {
805- return this . _q . push ( [ 'setUserId' , userId ] ) ;
805+ return this . _q . push ( [ 'setUserId' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
806806 }
807807
808808 try {
@@ -828,7 +828,7 @@ AmplitudeClient.prototype.setUserId = function setUserId(userId) {
828828 */
829829AmplitudeClient . prototype . setGroup = function ( groupType , groupName ) {
830830 if ( this . _shouldDeferCall ( ) ) {
831- return this . _q . push ( [ 'setGroup' , groupType , groupName ] ) ;
831+ return this . _q . push ( [ 'setGroup' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
832832 }
833833
834834 if ( ! this . _apiKeySet ( 'setGroup()' ) || ! utils . validateInput ( groupType , 'groupType' , 'string' ) ||
@@ -850,7 +850,7 @@ AmplitudeClient.prototype.setGroup = function(groupType, groupName) {
850850 */
851851AmplitudeClient . prototype . setOptOut = function setOptOut ( enable ) {
852852 if ( this . _shouldDeferCall ( ) ) {
853- return this . _q . push ( [ 'setOptOut' , enable ] ) ;
853+ return this . _q . push ( [ 'setOptOut' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
854854 }
855855
856856 if ( ! utils . validateInput ( enable , 'enable' , 'boolean' ) ) {
@@ -891,7 +891,7 @@ AmplitudeClient.prototype.resetSessionId = function resetSessionId() {
891891 */
892892AmplitudeClient . prototype . regenerateDeviceId = function regenerateDeviceId ( ) {
893893 if ( this . _shouldDeferCall ( ) ) {
894- return this . _q . push ( [ 'regenerateDeviceId' ] ) ;
894+ return this . _q . push ( [ 'regenerateDeviceId' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
895895 }
896896
897897 this . setDeviceId ( UUID ( ) + 'R' ) ;
@@ -907,7 +907,7 @@ AmplitudeClient.prototype.regenerateDeviceId = function regenerateDeviceId() {
907907 */
908908AmplitudeClient . prototype . setDeviceId = function setDeviceId ( deviceId ) {
909909 if ( this . _shouldDeferCall ( ) ) {
910- return this . _q . push ( [ 'setDeviceId' , deviceId ] ) ;
910+ return this . _q . push ( [ 'setDeviceId' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
911911 }
912912
913913 if ( ! utils . validateInput ( deviceId , 'deviceId' , 'string' ) ) {
@@ -934,7 +934,7 @@ AmplitudeClient.prototype.setDeviceId = function setDeviceId(deviceId) {
934934 */
935935AmplitudeClient . prototype . setUserProperties = function setUserProperties ( userProperties ) {
936936 if ( this . _shouldDeferCall ( ) ) {
937- return this . _q . push ( [ 'setUserProperties' , userProperties ] ) ;
937+ return this . _q . push ( [ 'setUserProperties' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
938938 }
939939 if ( ! this . _apiKeySet ( 'setUserProperties()' ) || ! utils . validateInput ( userProperties , 'userProperties' , 'object' ) ) {
940940 return ;
@@ -962,7 +962,7 @@ AmplitudeClient.prototype.setUserProperties = function setUserProperties(userPro
962962 */
963963AmplitudeClient . prototype . clearUserProperties = function clearUserProperties ( ) {
964964 if ( this . _shouldDeferCall ( ) ) {
965- return this . _q . push ( [ 'clearUserProperties' ] ) ;
965+ return this . _q . push ( [ 'clearUserProperties' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
966966 }
967967
968968 if ( ! this . _apiKeySet ( 'clearUserProperties()' ) ) {
@@ -1002,7 +1002,7 @@ var _convertProxyObjectToRealObject = function _convertProxyObjectToRealObject(i
10021002 */
10031003AmplitudeClient . prototype . identify = function ( identify_obj , opt_callback ) {
10041004 if ( this . _shouldDeferCall ( ) ) {
1005- return this . _q . push ( [ 'identify' , identify_obj , opt_callback ] ) ;
1005+ return this . _q . push ( [ 'identify' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
10061006 }
10071007 if ( ! this . _apiKeySet ( 'identify()' ) ) {
10081008 if ( type ( opt_callback ) === 'function' ) {
@@ -1037,7 +1037,7 @@ AmplitudeClient.prototype.identify = function(identify_obj, opt_callback) {
10371037
10381038AmplitudeClient . prototype . groupIdentify = function ( group_type , group_name , identify_obj , opt_callback ) {
10391039 if ( this . _shouldDeferCall ( ) ) {
1040- return this . _q . push ( [ 'groupIdentify' , group_type , group_name , identify_obj , opt_callback ] ) ;
1040+ return this . _q . push ( [ 'groupIdentify' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
10411041 }
10421042 if ( ! this . _apiKeySet ( 'groupIdentify()' ) ) {
10431043 if ( type ( opt_callback ) === 'function' ) {
@@ -1093,7 +1093,7 @@ AmplitudeClient.prototype.groupIdentify = function(group_type, group_name, ident
10931093 */
10941094AmplitudeClient . prototype . setVersionName = function setVersionName ( versionName ) {
10951095 if ( this . _shouldDeferCall ( ) ) {
1096- return this . _q . push ( [ 'setVersionName' , versionName ] ) ;
1096+ return this . _q . push ( [ 'setVersionName' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
10971097 }
10981098
10991099 if ( ! utils . validateInput ( versionName , 'versionName' , 'string' ) ) {
@@ -1256,7 +1256,7 @@ AmplitudeClient.prototype._limitEventsQueued = function _limitEventsQueued(queue
12561256 */
12571257AmplitudeClient . prototype . logEvent = function logEvent ( eventType , eventProperties , opt_callback ) {
12581258 if ( this . _shouldDeferCall ( ) ) {
1259- return this . _q . push ( [ 'logEvent' , eventType , eventProperties , opt_callback ] ) ;
1259+ return this . _q . push ( [ 'logEvent' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
12601260 }
12611261 return this . logEventWithTimestamp ( eventType , eventProperties , null , opt_callback ) ;
12621262} ;
@@ -1273,7 +1273,7 @@ AmplitudeClient.prototype.logEvent = function logEvent(eventType, eventPropertie
12731273 */
12741274AmplitudeClient . prototype . logEventWithTimestamp = function logEvent ( eventType , eventProperties , timestamp , opt_callback ) {
12751275 if ( this . _shouldDeferCall ( ) ) {
1276- return this . _q . push ( [ 'logEventWithTimestamp' , eventType , eventProperties , timestamp , opt_callback ] ) ;
1276+ return this . _q . push ( [ 'logEventWithTimestamp' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
12771277 }
12781278 if ( ! this . _apiKeySet ( 'logEvent()' ) ) {
12791279 if ( type ( opt_callback ) === 'function' ) {
@@ -1313,7 +1313,7 @@ AmplitudeClient.prototype.logEventWithTimestamp = function logEvent(eventType, e
13131313 */
13141314AmplitudeClient . prototype . logEventWithGroups = function ( eventType , eventProperties , groups , opt_callback ) {
13151315 if ( this . _shouldDeferCall ( ) ) {
1316- return this . _q . push ( [ 'logEventWithGroups' , eventType , eventProperties , groups , opt_callback ] ) ;
1316+ return this . _q . push ( [ 'logEventWithGroups' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
13171317 }
13181318 if ( ! this . _apiKeySet ( 'logEventWithGroups()' ) ) {
13191319 if ( type ( opt_callback ) === 'function' ) {
@@ -1350,7 +1350,7 @@ var _isNumber = function _isNumber(n) {
13501350 */
13511351AmplitudeClient . prototype . logRevenueV2 = function logRevenueV2 ( revenue_obj ) {
13521352 if ( this . _shouldDeferCall ( ) ) {
1353- return this . _q . push ( [ 'logRevenueV2' , revenue_obj ] ) ;
1353+ return this . _q . push ( [ 'logRevenueV2' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
13541354 }
13551355
13561356 if ( ! this . _apiKeySet ( 'logRevenueV2()' ) ) {
@@ -1384,7 +1384,7 @@ if (BUILD_COMPAT_2_0) {
13841384 */
13851385 AmplitudeClient . prototype . logRevenue = function logRevenue ( price , quantity , product ) {
13861386 if ( this . _shouldDeferCall ( ) ) {
1387- return this . _q . push ( [ 'logRevenue' , price , quantity , product ] ) ;
1387+ return this . _q . push ( [ 'logRevenue' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
13881388 }
13891389
13901390 // Test that the parameters are of the right type.
@@ -1611,9 +1611,9 @@ AmplitudeClient.prototype._shouldDeferCall = function _shouldDeferCall() {
16111611 * have accepted terms for tracking
16121612 * @private
16131613 */
1614- AmplitudeClient . prototype . _deferInitialization = function _deferInitialization ( apiKey , opt_userId , opt_config , opt_callback ) {
1614+ AmplitudeClient . prototype . _deferInitialization = function _deferInitialization ( ) {
16151615 this . _initializationDeferred = true ;
1616- this . _q . push ( [ 'init' , apiKey , opt_userId , opt_config , opt_callback ] ) ;
1616+ this . _q . push ( [ 'init' ] . concat ( Array . prototype . slice . call ( arguments , 0 ) ) ) ;
16171617} ;
16181618
16191619/**
0 commit comments