mirror of
https://github.com/vxcontrol/ncform.git
synced 2026-07-19 18:23:32 -04:00
fix: fixed "TypeError: Cannot read property 'showLegend' of undefined"
fix #57
This commit is contained in:
@@ -159,7 +159,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
legendEnable(fieldSchema) {
|
||||
return fieldSchema.ui.showLegend && fieldSchema.ui.legend;
|
||||
return fieldSchema.ui && fieldSchema.ui.showLegend && fieldSchema.ui.legend;
|
||||
}
|
||||
},
|
||||
mixins: [layoutObjectMixin]
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
},
|
||||
methods: {
|
||||
legendEnable(fieldSchema) {
|
||||
return fieldSchema.ui.showLegend && fieldSchema.ui.legend;
|
||||
return fieldSchema.ui && fieldSchema.ui.showLegend && fieldSchema.ui.legend;
|
||||
}
|
||||
},
|
||||
mixins: [layoutObjectMixin]
|
||||
|
||||
Reference in New Issue
Block a user