Skip to content

Commit

Permalink
Merge pull request #963 from nextcloud/limit-max-min
Browse files Browse the repository at this point in the history
fix: limit min and max numbers
  • Loading branch information
blizzz authored Apr 5, 2024
2 parents 340d6c1 + 21f1ef3 commit 285ae2d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ export default {
}
const roundedValue = parsedValue.toFixed(this.column?.numberDecimals)
let value = parseFloat(roundedValue)
if (this.column?.numberMin && value < this.column?.numberMin) {
if ((this.column?.numberMin !== null && this.column?.numberMin !== undefined) && value < this.column?.numberMin) {
value = this.column.numberMin
}
if (this.column?.numberMax && value > this.column?.numberMax) {
if ((this.column?.numberMax !== null && this.column?.numberMax !== undefined) && value > this.column?.numberMax) {
value = this.column.numberMax
}
return value
Expand Down

0 comments on commit 285ae2d

Please sign in to comment.