aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLeyla Jähnig <[email protected]>2022-04-05 18:16:41 +0200
committerGitHub <[email protected]>2022-04-05 16:16:41 +0000
commit307c2d20c6cafef55a10fb424e5683c0d018cc55 (patch)
treeca8a98efc742b51b889e7c0565b1b84073eb3a58 /src
parent6214425d92a2d34268283bace19a02d6f1d9924e (diff)
downloadfaker-307c2d20c6cafef55a10fb424e5683c0d018cc55.tar.xz
faker-307c2d20c6cafef55a10fb424e5683c0d018cc55.zip
refactor(helpers.shuffle): remove unused default value (#698)
Diffstat (limited to 'src')
-rw-r--r--src/helpers.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/helpers.ts b/src/helpers.ts
index f302ac46..e451eaab 100644
--- a/src/helpers.ts
+++ b/src/helpers.ts
@@ -417,11 +417,9 @@ export class Helpers {
return o || [];
}
- // TODO ST-DDT 2022-02-06: This default will never be taken!?
- o = o || (['a', 'b', 'c'] as unknown as T[]);
- for (let x: T, j: number, i = o.length - 1; i > 0; --i) {
- j = this.faker.datatype.number(i);
- x = o[i];
+ for (let i = o.length - 1; i > 0; --i) {
+ const j = this.faker.datatype.number(i);
+ const x = o[i];
o[i] = o[j];
o[j] = x;
}