Skip to content

Commit

Permalink
chore: align getter internals
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Dec 15, 2023
1 parent 9606164 commit 2fafaa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/cvss30.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ export class CVSS30 {
* @throws Metric does not exist.
*/
Get(metric: string): string {
let value = this._metrics[metric];
if (value == undefined) {
const v = this._metrics[metric];
if (v == undefined) {
throw new errors.InvalidMetric('3.0', metric);
}
return value;
return v;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/cvss31.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ export class CVSS31 {
* @throws Metric does not exist.
*/
Get(metric: string): string {
let value = this._metrics[metric];
if (value == undefined) {
const v = this._metrics[metric];
if (v == undefined) {
throw new errors.InvalidMetric('3.1', metric);
}
return value;
return v;
}

/**
Expand Down

0 comments on commit 2fafaa5

Please sign in to comment.