File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/packages/property-editors/content-picker Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,18 @@ export class UmbPropertyEditorUIContentPickerElement
78
78
this . #dynamicRoot = startNode . dynamicRoot ;
79
79
}
80
80
81
- this . _min = Number ( config . getValueByAlias ( 'minNumber' ) ) || 0 ;
82
- this . _max = Number ( config . getValueByAlias ( 'maxNumber' ) ) || Infinity ;
81
+ this . _min = this . #parseInt ( config . getValueByAlias ( 'minNumber' ) , 0 ) ;
82
+ this . _max = this . #parseInt ( config . getValueByAlias ( 'maxNumber' ) , Infinity ) ;
83
83
84
84
this . _allowedContentTypeUniques = config . getValueByAlias ( 'filter' ) ;
85
85
this . _showOpenButton = config . getValueByAlias ( 'showOpenButton' ) ;
86
86
}
87
87
88
+ #parseInt( value : unknown , fallback : number ) : number {
89
+ const num = Number ( value ) ;
90
+ return ! isNaN ( num ) && num > 0 ? num : fallback ;
91
+ }
92
+
88
93
override firstUpdated ( ) {
89
94
this . addFormControlElement ( this . shadowRoot ! . querySelector ( 'umb-input-content' ) ! ) ;
90
95
this . #setPickerRootUnique( ) ;
You can’t perform that action at this time.
0 commit comments