@@ -11,16 +11,6 @@ function isObject(val) {
1111 return val != null && typeof val === 'object' && Array . isArray ( val ) === false ;
1212}
1313
14- var isobject = /*#__PURE__*/ Object . freeze ( {
15- 'default' : isObject
16- } ) ;
17-
18- function getCjsExportFromNamespace ( n ) {
19- return n && n [ 'default' ] || n ;
20- }
21-
22- var isobject$1 = getCjsExportFromNamespace ( isobject ) ;
23-
2414// Copyright 2015 mParticle, Inc.
2515//
2616// Licensed under the Apache License, Version 2.0 (the "License");
@@ -99,7 +89,7 @@ var isobject$1 = getCjsExportFromNamespace(isobject);
9989 l [ i ] = function ( ) { ( l [ i ] . q = l [ i ] . q || [ ] ) . push ( arguments ) ; } ;
10090 l [ i ] . t = + new Date ;
10191 ( s = y . createElement ( t ) ) . type = 'text/javascript' ;
102- s . src = '//web.localytics.com/v3 /localytics.js' ;
92+ s . src = '//web.localytics.com/v4 /localytics.min .js' ;
10393 ( c = y . getElementsByTagName ( t ) [ 0 ] ) . parentNode . insertBefore ( s , c ) ;
10494 } ( window , document , 'script' , 'll' ) ;
10595
@@ -335,16 +325,16 @@ var isobject$1 = getCjsExportFromNamespace(isobject);
335325
336326 function register ( config ) {
337327 if ( ! config ) {
338- window . console . log ( 'You must pass a config object to register the kit ' + name ) ;
328+ console . log ( 'You must pass a config object to register the kit ' + name ) ;
339329 return ;
340330 }
341331
342- if ( ! isobject$1 ( config ) ) {
343- window . console . log ( '\'config\' must be an object. You passed in a ' + typeof config ) ;
332+ if ( ! isObject ( config ) ) {
333+ console . log ( '\'config\' must be an object. You passed in a ' + typeof config ) ;
344334 return ;
345335 }
346336
347- if ( isobject$1 ( config . kits ) ) {
337+ if ( isObject ( config . kits ) ) {
348338 config . kits [ name ] = {
349339 constructor : constructor
350340 } ;
@@ -354,15 +344,17 @@ var isobject$1 = getCjsExportFromNamespace(isobject);
354344 constructor : constructor
355345 } ;
356346 }
357- window . console . log ( 'Successfully registered ' + name + ' to your mParticle configuration' ) ;
347+ console . log ( 'Successfully registered ' + name + ' to your mParticle configuration' ) ;
358348 }
359349
360- if ( window && window . mParticle && window . mParticle . addForwarder ) {
361- window . mParticle . addForwarder ( {
362- name : name ,
363- constructor : constructor ,
364- getId : getId
365- } ) ;
350+ if ( typeof window !== 'undefined' ) {
351+ if ( window && window . mParticle && window . mParticle . addForwarder ) {
352+ window . mParticle . addForwarder ( {
353+ name : name ,
354+ constructor : constructor ,
355+ getId : getId
356+ } ) ;
357+ }
366358 }
367359
368360 var LocalyticsEventForwarder = {
0 commit comments