weiximei 5 years ago
parent
commit
44f6c4047c
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/pages/building/list/add/components/base.jsx

+ 5
- 1
src/pages/building/list/add/components/base.jsx View File

@@ -67,8 +67,12 @@ function AddBuilding(props) {
67 67
    
68 68
       
69 69
       poi.map(x => {
70
+        const ty = Object.prototype.toString
70 71
         // console.log('x.data: ', JSON.parse(x.data))
71
-        setFormMapScopeTagValue(x.key, { data: JSON.parse(x.data) })
72
+        console.log('x.data: ', typeof x.data, x.data instanceof String, ty.call(x.data))
73
+        if (ty.call(x.data) === '[object String]') {
74
+          setFormMapScopeTagValue(x.key, { data: JSON.parse(x.data) })
75
+        }
72 76
       })
73 77
     }
74 78
   }