summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/workflowengine/src/components/Rule.vue2
-rw-r--r--apps/workflowengine/src/helpers/api.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/workflowengine/src/components/Rule.vue b/apps/workflowengine/src/components/Rule.vue
index 2d3d5c8491a..fb04112b178 100644
--- a/apps/workflowengine/src/components/Rule.vue
+++ b/apps/workflowengine/src/components/Rule.vue
@@ -1,5 +1,5 @@
<template>
- <div class="section rule" :style="{ borderLeftColor: operation.color || '' }">
+ <div v-if="operation" class="section rule" :style="{ borderLeftColor: operation.color || '' }">
<div class="trigger">
<p>
<span>{{ t('workflowengine', 'When') }}</span>
diff --git a/apps/workflowengine/src/helpers/api.js b/apps/workflowengine/src/helpers/api.js
index ee4e8c7a520..76861d3bb35 100644
--- a/apps/workflowengine/src/helpers/api.js
+++ b/apps/workflowengine/src/helpers/api.js
@@ -19,10 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-const scopeValue = OCP.InitialState.loadState('workflowengine', 'scope') === 0 ? 'global' : 'user'
import { loadState } from '@nextcloud/initial-state'
+const scopeValue = loadState('workflowengine', 'scope') === 0 ? 'global' : 'user'
+
const getApiUrl = (url) => {
return OC.linkToOCS('apps/workflowengine/api/v1/workflows', 2) + scopeValue + url + '?format=json'
}