@abi-software/flatmapvuer 0.3.0-beta-0 → 0.3.0-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmapvuer",
3
- "version": "0.3.0-beta-0",
3
+ "version": "0.3.0-beta-1",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmapvuer",
3
- "version": "0.3.0-beta-0",
3
+ "version": "0.3.0-beta-1",
4
4
  "main": "./dist/flatmapvuer.common.js",
5
5
  "files": [
6
6
  "dist/*",
package/src/App.vue CHANGED
@@ -92,7 +92,7 @@ export default {
92
92
  initial: "Rat",
93
93
  helpMode: false,
94
94
  // flatmapAPI: "https://mapcore-demo.org/current/flatmap/v2/"
95
- // flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
95
+ //flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
96
96
  flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
97
97
  // flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v1/"
98
98
  }
@@ -79,7 +79,9 @@ const titleCase = (str) => {
79
79
  }
80
80
 
81
81
  const capitalise = function(str){
82
- return str.charAt(0).toUpperCase() + str.slice(1)
82
+ if (str)
83
+ return str.charAt(0).toUpperCase() + str.slice(1)
84
+ return ""
83
85
  }
84
86
 
85
87
  export default {
@@ -214,9 +216,10 @@ export default {
214
216
  body: JSON.stringify(data),
215
217
  })
216
218
  .then(response => response.json())
217
- .then(data => {
219
+ .then(payload => {
218
220
  uberons.forEach((el,i)=>{
219
- uberonMap[el] = data.values[i][0]
221
+ if (payload.values[i])
222
+ uberonMap[el] = payload.values[i][0]
220
223
  })
221
224
  resolve(uberonMap)
222
225
  })