mirror of
https://github.com/dvmarinoff/Auuki.git
synced 2026-02-17 15:37:39 +01:00
Allow athlete weight values with decimal point
This commit is contained in:
@@ -431,7 +431,7 @@ class Weight extends Model {
|
||||
const storageModel = {
|
||||
key: self.prop,
|
||||
fallback: self.defaultValue(),
|
||||
parse: parseInt,
|
||||
parse: parseFloat,
|
||||
};
|
||||
self.min = existance(args.min, 0);
|
||||
self.max = existance(args.max, 500);
|
||||
@@ -440,7 +440,7 @@ class Weight extends Model {
|
||||
defaultValue() { return 75; }
|
||||
defaultIsValid(value) {
|
||||
const self = this;
|
||||
return Number.isInteger(value) && inRange(self.min, self.max, value);
|
||||
return Number.isFinite(value) && inRange(self.min, self.max, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user