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 316316
317317 function register ( config ) {
318318 if ( ! config ) {
319- window . console . log ( 'You must pass a config object to register the kit ' + name ) ;
319+ console . log ( 'You must pass a config object to register the kit ' + name ) ;
320320 return ;
321321 }
322322
323323 if ( ! isobject ( config ) ) {
324- window . console . log ( '\'config\' must be an object. You passed in a ' + typeof config ) ;
324+ console . log ( '\'config\' must be an object. You passed in a ' + typeof config ) ;
325325 return ;
326326 }
327327
335335 constructor : constructor
336336 } ;
337337 }
338- window . console . log ( 'Successfully registered ' + name + ' to your mParticle configuration' ) ;
338+ console . log ( 'Successfully registered ' + name + ' to your mParticle configuration' ) ;
339339 }
340340
341- if ( window && window . mParticle && window . mParticle . addForwarder ) {
342- window . mParticle . addForwarder ( {
343- name : name ,
344- constructor : constructor ,
345- getId : getId
346- } ) ;
341+ if ( typeof window !== 'undefined' ) {
342+ if ( window && window . mParticle && window . mParticle . addForwarder ) {
343+ window . mParticle . addForwarder ( {
344+ name : name ,
345+ constructor : constructor ,
346+ getId : getId
347+ } ) ;
348+ }
347349 }
348350
349351 module . exports = {
You can’t perform that action at this time.
0 commit comments