Add process helper function to find out if a connection has FailedToLoad
@@ -143,6 +143,16 @@ export function isConnectionLoading(process, connUri, includeSubData = false) {
return getIn(process, ["connections", connUri, "loading"]);
}
+/**
+ * Return true if given needUri has failedToLoad
+ * @param process (full process from state)
+ * @param needUri
+ * @returns {*}
+ */
+export function hasConnectionFailedToLoad(process, connUri) {
+ return connUri && getIn(process, ["connections", connUri, "failedToLoad"]);
+}
+
/**
* Return true if any connUri is currently loading, if includeSubData is true, we also check the petriNetData and agreementData
* @param process
