Skip to content

Commit

Permalink
fix: remove redundant optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonardYam committed Jul 27, 2023
1 parent 15810db commit a3db64a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/models/field/numberField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ const createNumberFieldSchema = () => {
ValidationOptionsSchema.virtual('customMin').get(function (
this: NumberValidationOptions,
) {
return this.LengthValidationOptions?.customVal
return this.LengthValidationOptions.customVal
})

ValidationOptionsSchema.virtual('customMax').get(function (
this: NumberValidationOptions,
) {
return this.LengthValidationOptions?.customVal
return this.LengthValidationOptions.customVal
})

const NumberFieldSchema = new Schema<INumberFieldSchema>({
Expand Down

0 comments on commit a3db64a

Please sign in to comment.