File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 273
273
274
274
function register ( config ) {
275
275
if ( ! config ) {
276
- window . console . log ( 'You must pass a config object to register the kit ' + name ) ;
276
+ console . log ( 'You must pass a config object to register the kit ' + name ) ;
277
277
return ;
278
278
}
279
279
280
280
if ( ! isobject ( config ) ) {
281
- window . console . log ( '\'config\' must be an object. You passed in a ' + typeof config ) ;
281
+ console . log ( '\'config\' must be an object. You passed in a ' + typeof config ) ;
282
282
return ;
283
283
}
284
284
292
292
constructor : constructor
293
293
} ;
294
294
}
295
- window . console . log ( 'Successfully registered ' + name + ' to your mParticle configuration' ) ;
295
+ console . log ( 'Successfully registered ' + name + ' to your mParticle configuration' ) ;
296
296
}
297
297
298
- if ( window && window . mParticle && window . mParticle . addForwarder ) {
299
- window . mParticle . addForwarder ( {
300
- name : name ,
301
- constructor : constructor ,
302
- getId : getId
303
- } ) ;
298
+ if ( typeof window !== 'undefined' ) {
299
+ if ( window && window . mParticle && window . mParticle . addForwarder ) {
300
+ window . mParticle . addForwarder ( {
301
+ name : name ,
302
+ constructor : constructor ,
303
+ getId : getId
304
+ } ) ;
305
+ }
304
306
}
305
307
306
308
module . exports = {
You can’t perform that action at this time.
0 commit comments