File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -425,7 +425,7 @@ var constructor = function () {
425425
426426 function isPartnerInLocalLauncherTestGroup ( ) {
427427 var url = new URL ( window . location . href ) ;
428- var { hostname } = url ;
428+ var hostname = url . hostname ;
429429 var hash = hashString ( hostname ) ;
430430
431431 return self . testGroup . includes ( hash ) ;
@@ -437,13 +437,13 @@ var constructor = function () {
437437 * @returns {bigint } A 64-bit BigInt representing the hash of the string.
438438 */
439439 function hashString ( str ) {
440- var hash = 5381n ;
441-
442- for ( let i = 0 ; i < str . length ; i ++ ) {
440+ var hash = BigInt ( 5381 ) ;
441+
442+ for ( var i = 0 ; i < str . length ; i ++ ) {
443443 var charCode = BigInt ( str . charCodeAt ( i ) ) ;
444- hash = ( hash << 5n ) + hash + charCode ;
444+ hash = ( hash << BigInt ( 5 ) ) + hash + charCode ;
445445 }
446-
446+
447447 return hash ;
448448 }
449449} ;
Original file line number Diff line number Diff line change 11/* eslint-env es6, mocha */
22/* eslint-parser babel-eslint */
3+ /* global BigInt */
34
45const packageVersion = require ( '../../package.json' ) . version ;
56const sdkVersion = 'mParticle_wsdkv_1.2.3' ;
@@ -583,7 +584,9 @@ describe('Rokt Forwarder', () => {
583584 } ) ;
584585
585586 it ( 'should create a local launcher if the partner is in the local launcher test group' , async ( ) => {
586- window . mParticle . forwarder . testGroup = [ BigInt ( '249896952128253326' ) ] ;
587+ window . mParticle . forwarder . testGroup = [
588+ BigInt ( '249896952128253326' ) ,
589+ ] ;
587590
588591 await window . mParticle . forwarder . init (
589592 { accountId : '123456' } ,
You can’t perform that action at this time.
0 commit comments