@data-fair/lib-vue 1.15.0 → 1.15.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/ui-notif.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vue",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "Composables and other utilities for Vue applications in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
package/ui-notif.js CHANGED
@@ -15,8 +15,8 @@ export function getErrorMsg (error) {
15
15
  if (typeof error === 'string') { return error }
16
16
  if (error.data && typeof error.data === 'string') { return error.data }
17
17
  if (error.response?.data && typeof error.response.data === 'string') { return error.response.data }
18
- if (typeof error.statusText === 'string') { return error.statusText }
19
- if (typeof error.response?.statusText === 'string') { return error.response?.statusText }
18
+ if (error.statusText && typeof error.statusText === 'string') { return error.statusText }
19
+ if (error.response?.statusText && typeof error.response?.statusText === 'string') { return error.response?.statusText }
20
20
  if (error.message) { return error.message }
21
21
  return 'erreur inconnue'
22
22
  }