@truedat/core 4.42.2 → 4.42.3

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.42.3] 2022-04-13
4
+
5
+ # Fixed
6
+
7
+ - [TD-4721] Remove alert if only have sources error
8
+
3
9
  ## [4.42.2] 2022-04-12
4
10
 
5
11
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/core",
3
- "version": "4.42.2",
3
+ "version": "4.42.3",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -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": "1ca6b75d5b0c80c8e2e931340d5efe4eeefb27de"
109
+ "gitHead": "5adf3b4e2996ade1df6c42dcacec8cf74807db3e"
110
110
  }
@@ -29,13 +29,21 @@ export const defaultMessage = (state, type, payload) => {
29
29
 
30
30
  export const graphQLErrors = (payload) => {
31
31
  const errorList = _.map(_.pick(["path", "message"]))(payload.graphQLErrors);
32
- return {
33
- error: true,
34
- header: "Error",
35
- icon: "attention",
36
- errorList: errorList,
37
- text: "List of errors",
38
- };
32
+ const hasErrorSources = _.flow(
33
+ _.map("path"),
34
+ _.flatten,
35
+ _.remove((path) => _.eq(path, "sources"))
36
+ )(errorList);
37
+
38
+ return _.isEmpty(hasErrorSources)
39
+ ? {}
40
+ : {
41
+ error: true,
42
+ header: "Error",
43
+ icon: "attention",
44
+ errorList: errorList,
45
+ text: "List of errors",
46
+ };
39
47
  };
40
48
 
41
49
  export const toErrorList = (prefix) =>