shaun-sheep 4 jaren geleden
bovenliggende
commit
61aed4ecaf
1 gewijzigde bestanden met toevoegingen van 8 en 6 verwijderingen
  1. 8 6
      src/views/legendLibrary/index.vue

+ 8 - 6
src/views/legendLibrary/index.vue

@@ -445,12 +445,14 @@ export default {
                 this.key++
                 // this.tableData = res.Content
                 this.total = res.Total
-                this.tableData = res.Content.map(i => {
-                    if (i.FillColor.length == '9') {
-                        i.FillColor = hexToRgba(i.FillColor)
-                    }
-                    return i
-                })
+                this.tableData =
+                    res.Content &&
+                    res.Content.map(i => {
+                        if (i.FillColor.length == '9') {
+                            i.FillColor = hexToRgba(i.FillColor)
+                        }
+                        return i
+                    })
                 console.log(this.tableData)
             })
         },