File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,22 +35,22 @@ Branch.prototype.disableGlobalListenersWarnings = function () {
3535 disableGlobalListenersWarnings = true
3636}
3737
38- var previousLinkTimestamp = null
3938var runOnce = true
39+ var previousLinkTimestamp = null
4040Branch . prototype . initSession = function ( deepLinkDataListener ) {
4141 // handle double init from onResume on iOS
4242 if ( ! runOnce ) return new Promise ( function ( resolve , reject ) { } )
4343 runOnce = ( deviceVendor . indexOf ( 'Apple' ) < 0 )
4444
4545 // private method to filter out +clicked_branch_link = false in deep link callback
4646 var deepLinkDataParser = function ( deepLinkData ) {
47+ var timestamp = '+click_timestamp'
4748 var isBranchLink = '+clicked_branch_link'
4849 var isNonBranchLink = '+non_branch_link'
49- var timestamp = '+click_timestamp'
5050
5151 var isBranchLinkClick = deepLinkData . hasOwnProperty ( isBranchLink ) && deepLinkData [ isBranchLink ] === true
5252 var isNonBranchLinkClick = deepLinkData . hasOwnProperty ( isNonBranchLink )
53- var currentLinkTimestamp = deepLinkData . hasOwnProperty ( timestamp ) ? deepLinkData [ timestamp ] : null
53+ var currentLinkTimestamp = deepLinkData . hasOwnProperty ( timestamp ) ? deepLinkData [ timestamp ] : Date . now ( )
5454
5555 // is +clicked_branch_link' = true || +non_branch_link && !previousLinkTimestamp
5656 if ( ( isBranchLinkClick || isNonBranchLinkClick ) && currentLinkTimestamp !== previousLinkTimestamp ) {
You can’t perform that action at this time.
0 commit comments