File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,8 @@ var create_client = function(token, config) {
57
57
58
58
var request_options = {
59
59
60
- // Split host, to host and port, for http.get
61
- host : metrics . config . host . split ( ':' ) [ 0 ] ,
62
- port : metrics . config . host . split ( ':' ) [ 1 ] ? metrics . config . host . split ( ':' ) [ 1 ] : 80 ,
63
-
60
+ host : metrics . config . host ,
61
+ port : metrics . config . port ,
64
62
headers : { }
65
63
} ;
66
64
@@ -690,11 +688,17 @@ var create_client = function(token, config) {
690
688
mixpanel client config
691
689
*/
692
690
metrics . set_config = function ( config ) {
691
+
693
692
for ( var c in config ) {
694
693
if ( config . hasOwnProperty ( c ) ) {
695
694
metrics . config [ c ] = config [ c ] ;
696
695
}
697
696
}
697
+
698
+ // Split host, into host and port
699
+ metrics . config . port = metrics . config . host . split ( ':' ) [ 1 ] ? metrics . config . host . split ( ':' ) [ 1 ] : 80 ;
700
+ metrics . config . host = metrics . config . host . split ( ':' ) [ 0 ] ;
701
+
698
702
} ;
699
703
700
704
if ( config ) {
You can’t perform that action at this time.
0 commit comments