Skip to content

Commit

Permalink
chore: fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikamura committed Jan 13, 2023
1 parent fd2cc3c commit d0ab6b4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,12 @@ export default class Redlock extends EventEmitter {
let result: number;
try {
// Attempt to evaluate the script by its hash.
const shaResult = await client.evalsha(script.hash, keys.length, ...keys, ...args);
const shaResult = await client.evalsha(
script.hash,
keys.length,
...keys,
...args
);
if (typeof shaResult !== "number") {
throw new Error(
`Unexpected result of type ${typeof shaResult} returned from redis.`
Expand All @@ -569,7 +574,12 @@ export default class Redlock extends EventEmitter {
) {
throw error;
}
const rawResult = await client.eval(script.value, keys.length, ...keys, ...args);
const rawResult = await client.eval(
script.value,
keys.length,
...keys,
...args
);

if (typeof rawResult !== "number") {
throw new Error(
Expand Down

0 comments on commit d0ab6b4

Please sign in to comment.