File tree 1 file changed +7
-11
lines changed
1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -68,25 +68,21 @@ export const getStore: {
68
68
return new Store ( { client, name : input } )
69
69
}
70
70
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' ) {
75
72
const { siteID, token } = input
76
- const clientOptions = getClientOptions ( input , {
77
- siteID,
78
- token
79
- } )
73
+ const clientOptions = getClientOptions ( input , { siteID, token } )
80
74
81
- if ( ! siteID || ! token ) {
82
- throw new MissingBlobsEnvironmentError ( [ 'siteID' , 'token' ] )
75
+ if ( ! name || ! siteID || ! token ) {
76
+ throw new MissingBlobsEnvironmentError ( [ 'name' , ' siteID', 'token' ] )
83
77
}
84
78
85
79
const client = new Client ( clientOptions )
86
80
87
81
return new Store ( { client, name } )
88
82
}
89
-
83
+
84
+ if ( typeof input ?. name === 'string' ) {
85
+ const { name } = input
90
86
const clientOptions = getClientOptions ( input )
91
87
92
88
if ( ! name ) {
You can’t perform that action at this time.
0 commit comments