Fixing some redis type errors.
This commit is contained in:
parent
13d987023a
commit
cde4dabe42
|
@ -80,6 +80,7 @@
|
|||
"global-agent": "3.0.0",
|
||||
"google-auth-library": "7.12.0",
|
||||
"google-spreadsheet": "3.2.0",
|
||||
"ioredis": "5.3.2",
|
||||
"jimp": "0.16.1",
|
||||
"joi": "17.6.0",
|
||||
"js-yaml": "4.1.0",
|
||||
|
@ -137,7 +138,6 @@
|
|||
"@types/bson": "4.2.0",
|
||||
"@types/global-agent": "2.1.1",
|
||||
"@types/google-spreadsheet": "3.1.5",
|
||||
"@types/ioredis": "4.28.10",
|
||||
"@types/jest": "29.5.0",
|
||||
"@types/koa": "2.13.4",
|
||||
"@types/koa__router": "8.0.8",
|
||||
|
|
|
@ -177,7 +177,13 @@ class RedisIntegration {
|
|||
const pipeline = this.client.pipeline(pipelineCommands)
|
||||
const result = await pipeline.exec()
|
||||
|
||||
return result.map((output: string | string[]) => output[1])
|
||||
return result?.map((output: any) => {
|
||||
if (typeof output === "string") {
|
||||
return output
|
||||
} else if (Array.isArray(output)) {
|
||||
return output[1]
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue