File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -68,25 +68,21 @@ export const getStore: {
6868 return new Store ( { client, name : input } )
6969 }
7070
71- if ( typeof input ?. name === 'string' ) {
72- const { name } = input
73-
74- if ( typeof input ?. siteID === 'string' && typeof input . token === 'string' ) {
71+ if ( typeof input ?. name === 'string' && typeof input ?. siteID === 'string' && typeof input ?. token === 'string' ) {
7572 const { siteID, token } = input
76- const clientOptions = getClientOptions ( input , {
77- siteID,
78- token
79- } )
73+ const clientOptions = getClientOptions ( input , { siteID, token } )
8074
81- if ( ! siteID || ! token ) {
82- throw new MissingBlobsEnvironmentError ( [ 'siteID' , 'token' ] )
75+ if ( ! name || ! siteID || ! token ) {
76+ throw new MissingBlobsEnvironmentError ( [ 'name' , ' siteID', 'token' ] )
8377 }
8478
8579 const client = new Client ( clientOptions )
8680
8781 return new Store ( { client, name } )
8882 }
89-
83+
84+ if ( typeof input ?. name === 'string' ) {
85+ const { name } = input
9086 const clientOptions = getClientOptions ( input )
9187
9288 if ( ! name ) {
You can’t perform that action at this time.
0 commit comments