Skip to content

Commit 67a13bf

Browse files
authored
fix: lint errors
1 parent 76fb579 commit 67a13bf

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/store_factory.ts

+7-11
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)