@truedat/core 4.41.4 → 4.42.2
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/CHANGELOG.md +6 -0
- package/package.json +3 -3
- package/src/components/Alert.js +2 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.42.2",
|
|
4
4
|
"description": "Truedat Web Core",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@babel/plugin-transform-modules-commonjs": "^7.15.0",
|
|
33
33
|
"@babel/preset-env": "^7.15.0",
|
|
34
34
|
"@babel/preset-react": "^7.14.5",
|
|
35
|
-
"@truedat/test": "4.
|
|
35
|
+
"@truedat/test": "4.42.0",
|
|
36
36
|
"babel-jest": "^27.0.6",
|
|
37
37
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
38
38
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"react-dom": ">= 16.8.6 < 17",
|
|
107
107
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "1ca6b75d5b0c80c8e2e931340d5efe4eeefb27de"
|
|
110
110
|
}
|
package/src/components/Alert.js
CHANGED
|
@@ -11,6 +11,8 @@ import { AlertExporter } from "./AlertExporter";
|
|
|
11
11
|
const existingList = (list) => list && !_.isEmpty(list);
|
|
12
12
|
|
|
13
13
|
const formatErrorMessages = (error, formatMessage) => {
|
|
14
|
+
if (_.isString(error?.message)) return error.message;
|
|
15
|
+
|
|
14
16
|
if (_.every(["name", "code"], _.partial(_.has)(error)))
|
|
15
17
|
return formatMessage(
|
|
16
18
|
{ id: error.name, defaultMessage: error.name },
|
|
@@ -20,8 +22,6 @@ const formatErrorMessages = (error, formatMessage) => {
|
|
|
20
22
|
if (_.has("name")(error))
|
|
21
23
|
return formatMessage({ id: error.name, defaultMessage: error.name });
|
|
22
24
|
|
|
23
|
-
if (_.isString(error?.message)) return error.message;
|
|
24
|
-
|
|
25
25
|
return formatMessage({
|
|
26
26
|
id: "error.unknown",
|
|
27
27
|
defaultMessage: "Unexpected error",
|