Skip to content

Commit f9f5e49

Browse files
authored
fixed MIGRATE function when key is array (#2184)
* fix: 2163 push empty string as arg * fix: updated migrate test with keys array
1 parent d2bba1d commit f9f5e49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/client/lib/commands/MIGRATE.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('MIGRATE', () => {
1313
it('multiple keys', () => {
1414
assert.deepEqual(
1515
transformArguments('127.0.0.1', 6379, ['1', '2'], 0, 10),
16-
['MIGRATE', '127.0.0.1', '6379', '""', '0', '10', 'KEYS', '1', '2']
16+
['MIGRATE', '127.0.0.1', '6379', '', '0', '10', 'KEYS', '1', '2']
1717
);
1818
});
1919

packages/client/lib/commands/MIGRATE.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function transformArguments(
1919
isKeyArray = Array.isArray(key);
2020

2121
if (isKeyArray) {
22-
args.push('""');
22+
args.push('');
2323
} else {
2424
args.push(key);
2525
}

0 commit comments

Comments
 (0)