File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ test('Custom parameters', () => {
99 expect ( api . getQueryString ( { encode : false } ) ) . toBe ( 'foo[bar]=baz&bar[0]=a&bar[1]=b&bar[2]=c' ) ;
1010 api . clear ( ) ;
1111 expect ( api . getQueryString ( ) ) . toBe ( '' ) ;
12- expect ( api . addCustomParam ( { foo : 'bar' } ) ) . toBeInstanceOf ( DrupalJsonApiParams )
12+ expect ( api . addCustomParam ( { foo : 'bar' } ) ) . toBeInstanceOf ( DrupalJsonApiParams ) ;
1313} ) ;
1414
1515test ( "Nova's Ark with custom params" , ( ) => {
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ export interface DrupalJsonApiParamsInterface {
6060 getQueryObject ( ) : object ;
6161}
6262export class DrupalJsonApiParams implements DrupalJsonApiParamsInterface {
63-
6463 protected data : DrupalJsonApiParamsStore = {
6564 filter : { } ,
6665 include : [ ] ,
@@ -395,19 +394,19 @@ export class DrupalJsonApiParams implements DrupalJsonApiParamsInterface {
395394 */
396395 public getQueryObject ( ) : ParamBag < any > {
397396 const foo : ParamBag < any > = JSON . parse ( JSON . stringify ( this . data ) ) ;
398-
397+
399398 if ( this . data . include . length > 0 ) {
400- foo . include = this . data . include . join ( "," ) ;
399+ foo . include = this . data . include . join ( ',' ) ;
401400 } else {
402401 delete foo . include ;
403402 }
404-
403+
405404 if ( this . data . sort . length > 0 ) {
406- foo . sort = this . data . sort . join ( "," ) ;
405+ foo . sort = this . data . sort . join ( ',' ) ;
407406 } else {
408407 delete foo . sort ;
409408 }
410-
409+
411410 return foo ;
412411 }
413412
You can’t perform that action at this time.
0 commit comments