fix: prototype pollution vulnerability in parse-git-config (#15242)
Fixes [Dependabot Alert 203](https://github.com/twentyhq/twenty/security/dependabot/203) - prototype pollution vulnerability in parse-git-config. parse-git-config was a dependency for danger@11.3.1, but danger@13.0.4 does not depend on it.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { danger } from 'danger';
|
||||
|
||||
const ordinalSuffix = (number) => {
|
||||
const ordinalSuffix = (number: number) => {
|
||||
const v = number % 100;
|
||||
if (v === 11 || v === 12 || v === 13) {
|
||||
return number + 'th';
|
||||
}
|
||||
const suffixes = { 1: 'st', 2: 'nd', 3: 'rd' };
|
||||
const suffixes: Record<number, string> = { 1: 'st', 2: 'nd', 3: 'rd' };
|
||||
return number + (suffixes[v % 10] || 'th');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user