@@ -325,11 +325,9 @@ class VaultClient {
325325 Version : '2010-05-08' ,
326326 } ;
327327
328- if ( accountName ) {
329- assert ( ! this . parameterValidation || typeof accountName === 'string' ,
330- 'the account name, if set, should be a string' ) ;
331- data . AccountName = accountName ;
332- }
328+ assert ( ! this . parameterValidation || typeof accountName === 'string' ,
329+ 'the account name should be a string' ) ;
330+ data . AccountName = accountName ;
333331 this . request ( 'POST' , '/' , true , callback , data ) ;
334332 }
335333
@@ -348,12 +346,10 @@ class VaultClient {
348346 limits : JSON . stringify ( limits ) ,
349347 } ;
350348 assert ( ! this . parameterValidation || ( limits && typeof limits === 'object' ) ,
351- 'Limits must be an object' ) ;
352- if ( accountName ) {
353- assert ( ! this . parameterValidation || typeof accountName === 'string' ,
354- 'the account name, if set, should be a string' ) ;
355- data . AccountName = accountName ;
356- }
349+ 'limits must be an object' ) ;
350+ assert ( ! this . parameterValidation || typeof accountName === 'string' ,
351+ 'the account name should be a string' ) ;
352+ data . AccountName = accountName ;
357353 this . request ( 'POST' , '/' , true , callback , data ) ;
358354 }
359355
@@ -370,11 +366,9 @@ class VaultClient {
370366 Version : '2010-05-08' ,
371367 } ;
372368
373- if ( accountName ) {
374- assert ( ! this . parameterValidation || typeof accountName === 'string' ,
375- 'the account name, if set, should be a string' ) ;
376- data . AccountName = accountName ;
377- }
369+ assert ( ! this . parameterValidation || typeof accountName === 'string' ,
370+ 'the account name should be a string' ) ;
371+ data . AccountName = accountName ;
378372 this . request ( 'POST' , '/' , true , callback , data ) ;
379373 }
380374
@@ -391,11 +385,9 @@ class VaultClient {
391385 Version : '2010-05-08' ,
392386 } ;
393387
394- if ( accountName ) {
395- assert ( ! this . parameterValidation || typeof accountName === 'string' ,
396- 'the account name, if set, should be a string' ) ;
397- data . AccountName = accountName ;
398- }
388+ assert ( ! this . parameterValidation || typeof accountName === 'string' ,
389+ 'the account name should be a string' ) ;
390+ data . AccountName = accountName ;
399391 this . request ( 'POST' , '/' , true , callback , data ) ;
400392 }
401393
0 commit comments