We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f9748d commit 570bd6bCopy full SHA for 570bd6b
1 file changed
components/src/components/SimpleNumber/Component.ts
@@ -53,8 +53,8 @@ export default class Component extends (ParentComponent as any) {
53
const decimalPlaces = this.component.decimalLimit || 2;
54
const multiplier = Math.pow(10, decimalPlaces);
55
let numValue = Number.parseFloat(value);
56
- if (!Number.isNaN(numValue)) {
57
- switch (this.component.rounding.method) {
+ if (!Number.isNaN(numValue) && this.component.rounding) {
+ switch (this.component?.rounding?.method) {
58
case 'floor':
59
numValue = Math.floor(numValue * multiplier) / multiplier;
60
break;
0 commit comments