aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorShinigami <[email protected]>2024-02-19 11:08:48 +0100
committerGitHub <[email protected]>2024-02-19 11:08:48 +0100
commit9882760a5b2f76f857ea9160bc687d6e536caf38 (patch)
tree2c5a7797e01829689a69808be2db3ad299a88999 /src/modules
parentfd31ec6cf03b273c22ab7c4294fc874ce5ff1ace (diff)
downloadfaker-9882760a5b2f76f857ea9160bc687d6e536caf38.tar.xz
faker-9882760a5b2f76f857ea9160bc687d6e536caf38.zip
infra(unicorn): prefer-at (#2654)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/helpers/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts
index 73728f78..bd905740 100644
--- a/src/modules/helpers/index.ts
+++ b/src/modules/helpers/index.ts
@@ -989,7 +989,8 @@ export class SimpleHelpersModule extends SimpleModuleBase {
}
// In case of rounding errors, return the last element
- return array[array.length - 1].value;
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ return array.at(-1)!.value;
}
/**