@@ -29,8 +29,8 @@ export default {
29
29
cache : false ,
30
30
get ( ) {
31
31
let val ;
32
- if ( isFunction ( this . schema . get ) ) val = this . schema . get ( this . model ) ;
33
- else if ( this . model && this . schema . model ) val = objGet ( this . model , this . schema . model ) ;
32
+ if ( isFunction ( objGet ( this . schema , ' get' ) ) ) val = this . schema . get ( this . model ) ;
33
+ else val = objGet ( this . model , this . schema . model ) ;
34
34
35
35
return this . formatValueToField ( val ) ;
36
36
} ,
@@ -137,7 +137,7 @@ export default {
137
137
this . schema . onChanged . call ( this , this . model , newValue , oldValue , this . schema ) ;
138
138
}
139
139
140
- if ( objGet ( this . $parent , "options" ) && objGet ( this . $parent , "options .validateAfterChanged", false ) === true ) {
140
+ if ( objGet ( this . $parent , "options.validateAfterChanged" , false ) === true ) {
141
141
if ( objGet ( this . $parent , "options.validateDebounceTime" , 0 ) > 0 ) {
142
142
this . debouncedValidate ( ) ;
143
143
} else {
@@ -184,12 +184,12 @@ export default {
184
184
} ,
185
185
186
186
getFieldID ( schema ) {
187
- const idPrefix = this . formOptions && objGet ( this . formOptions , "fieldIdPrefix" ) ? objGet ( this . formOptions , "fieldIdPrefix" ) : "" ;
187
+ const idPrefix = objGet ( this . formOptions , "fieldIdPrefix" , "" ) ;
188
188
return slugifyFormID ( schema , idPrefix ) ;
189
189
} ,
190
190
191
191
getFieldClasses ( ) {
192
- return objGet ( this . schema , "fieldClasses" ) || [ ] ;
192
+ return objGet ( this . schema , "fieldClasses" , [ ] ) ;
193
193
} ,
194
194
195
195
formatValueToField ( value ) {
0 commit comments