File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ class Application extends api.events.EventEmitter {
341341 } else {
342342 client . files = files ;
343343 client . fields = fields ;
344- Object . assign ( client . parameters , client . fields ) ;
344+ client . parameters = { ... client . parameters , ... client . fields } ;
345345 client . dispatch ( ) ;
346346 }
347347 } ) ;
@@ -356,7 +356,7 @@ class Application extends api.events.EventEmitter {
356356 } else {
357357 client . fields = api . querystring . parse ( client . data ) ;
358358 }
359- Object . assign ( client . parameters , client . fields ) ;
359+ client . parameters = { ... client . parameters , ... client . fields } ;
360360 client . dispatch ( ) ;
361361 } ) ;
362362 }
Original file line number Diff line number Diff line change @@ -48,10 +48,13 @@ class Client {
4848 this . query = api . querystring . parse ( url . query ) ;
4949 this . schema = config . transport === 'tls' ? 'https' : 'http' ;
5050 this . method = req . method . toLowerCase ( ) ;
51- this . access = Object . assign ( { } , DEFAULT_ACCESS ) ;
51+ this . access = { ... DEFAULT_ACCESS } ;
5252 this . calculateAccess ( ) ;
53- this . parameters = req . parameters || { } ; // <Object>
54- Object . assign ( this . parameters , this . query ) ;
53+ if ( req . parameters ) {
54+ this . parameters = { ...req . parameters , ...this . query } ;
55+ } else {
56+ this . parameters = { ...this . query } ;
57+ }
5558 this . fields = null ; // <Object>
5659 this . files = null ; // <Object>
5760 this . slowTime = config . slowTime || DEFAULT_SLOW_TIME ;
@@ -555,7 +558,7 @@ class Client {
555558 }
556559 if ( handler === 'access' ) {
557560 // fn is an object here, not function
558- Object . assign ( this . access , fn ) ;
561+ this . access = { ... this . access , ... fn } ;
559562 this . calculateAccess ( ) ;
560563 callback ( ) ;
561564 return ;
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ const prepareServersConfig = () => {
271271 }
272272 for ( let i = 0 ; i < config . ports . length ; i ++ ) {
273273 const port = config . ports [ i ] ;
274- const server = Object . assign ( { } , config ) ;
274+ const server = { ... config } ;
275275 server . port = port ;
276276 const serviceName = serverName + ( serverName === 'master' ? '' : port ) ;
277277 if ( server . inspect ) server . inspect += i ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ impress.fork = (env, inspect) => {
1212 argv . push ( '--inspect=' + inspect ) ;
1313 }
1414 const opt = {
15- env : Object . assign ( { } , process . env , env ) ,
15+ env : { ... process . env , ... env } ,
1616 execArgv : argv
1717 } ;
1818 return api . cp . fork ( modulePath , args , opt ) ;
You can’t perform that action at this time.
0 commit comments