fix errori generici in chart e combo

This commit is contained in:
=
2020-07-20 16:58:54 +02:00
parent f8282974b3
commit 9299cccc50
2 changed files with 7 additions and 6 deletions
@@ -12,13 +12,14 @@ export default class Combo extends Vue {
get options() {
let result: { id: number, text: string, anim: string }[] = [];
for (const key in this.value.enumVal) {
if (this.value.enumVal.hasOwnProperty(key)) {
const element = this.value.enumVal[key];
if (this.value.enumVal)
for (const key in this.value.enumVal) {
if (this.value.enumVal.hasOwnProperty(key)) {
const element = this.value.enumVal[key];
result.push({ id: parseInt(key), text: element.text, anim: element.anim })
result.push({ id: parseInt(key), text: element.text, anim: element.anim })
}
}
}
return result;
}
@@ -12,7 +12,7 @@ export default class SVGChart extends Vue {
@Prop({ default: [] })
bars: svg.BarChartInfo[];
@Prop({ default: [] })
@Prop({ default: function () { return [] } })
lines: svg.LineChartInfo[]
@Prop()