File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " vue-api-queries" ,
3- "version" : " 0.0.13 " ,
3+ "version" : " 0.0.14 " ,
44 "description" : " Elegant and simple way to build requests for REST API" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ class BaseProxy {
103103 return parameters . length === 0 ? url : `${ url } ?${ parameters . join ( '&' ) } `
104104 }
105105
106- __getQueryString ( parameter : string ) : string [ ] {
106+ __getQueryString ( parameter : string ) : any | any [ ] {
107107 const queries : string [ ] = parameter . split ( '&' )
108108 const obj : any = { }
109109 queries . forEach ( function ( property : string ) {
@@ -180,7 +180,10 @@ class BaseProxy {
180180
181181 setParameter ( parameter : string , value ?: any ) : this {
182182 if ( ! value ) {
183- this . parameters = this . __getQueryString ( parameter )
183+ const params = this . __getQueryString ( parameter )
184+ Object . entries ( params ) . forEach (
185+ ( [ key , value ] ) => ( this . parameters [ key ] = value ) ,
186+ )
184187 return this
185188 }
186189 this . parameters [ parameter ] = value
You can’t perform that action at this time.
0 commit comments