Fixing some redis type errors.

This commit is contained in:
Michael Drury 2023-06-01 11:10:39 +01:00
parent 13d987023a
commit cde4dabe42
2 changed files with 8 additions and 2 deletions

View File

@ -80,6 +80,7 @@
"global-agent": "3.0.0", "global-agent": "3.0.0",
"google-auth-library": "7.12.0", "google-auth-library": "7.12.0",
"google-spreadsheet": "3.2.0", "google-spreadsheet": "3.2.0",
"ioredis": "5.3.2",
"jimp": "0.16.1", "jimp": "0.16.1",
"joi": "17.6.0", "joi": "17.6.0",
"js-yaml": "4.1.0", "js-yaml": "4.1.0",
@ -137,7 +138,6 @@
"@types/bson": "4.2.0", "@types/bson": "4.2.0",
"@types/global-agent": "2.1.1", "@types/global-agent": "2.1.1",
"@types/google-spreadsheet": "3.1.5", "@types/google-spreadsheet": "3.1.5",
"@types/ioredis": "4.28.10",
"@types/jest": "29.5.0", "@types/jest": "29.5.0",
"@types/koa": "2.13.4", "@types/koa": "2.13.4",
"@types/koa__router": "8.0.8", "@types/koa__router": "8.0.8",

View File

@ -177,7 +177,13 @@ class RedisIntegration {
const pipeline = this.client.pipeline(pipelineCommands) const pipeline = this.client.pipeline(pipelineCommands)
const result = await pipeline.exec() 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]
}
})
}) })
} }
} }