@@ -29,8 +29,8 @@ export default {
2929 cache : false ,
3030 get ( ) {
3131 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 ) ;
3434
3535 return this . formatValueToField ( val ) ;
3636 } ,
@@ -137,7 +137,7 @@ export default {
137137 this . schema . onChanged . call ( this , this . model , newValue , oldValue , this . schema ) ;
138138 }
139139
140- if ( objGet ( this . $parent , "options" ) && objGet ( this . $parent , "options .validateAfterChanged", false ) === true ) {
140+ if ( objGet ( this . $parent , "options.validateAfterChanged" , false ) === true ) {
141141 if ( objGet ( this . $parent , "options.validateDebounceTime" , 0 ) > 0 ) {
142142 this . debouncedValidate ( ) ;
143143 } else {
@@ -184,12 +184,12 @@ export default {
184184 } ,
185185
186186 getFieldID ( schema ) {
187- const idPrefix = this . formOptions && objGet ( this . formOptions , "fieldIdPrefix" ) ? objGet ( this . formOptions , "fieldIdPrefix" ) : "" ;
187+ const idPrefix = objGet ( this . formOptions , "fieldIdPrefix" , "" ) ;
188188 return slugifyFormID ( schema , idPrefix ) ;
189189 } ,
190190
191191 getFieldClasses ( ) {
192- return objGet ( this . schema , "fieldClasses" ) || [ ] ;
192+ return objGet ( this . schema , "fieldClasses" , [ ] ) ;
193193 } ,
194194
195195 formatValueToField ( value ) {
0 commit comments