From 61a752d17d64d5ea2c19291494e1d0ed74e4e413 Mon Sep 17 00:00:00 2001 From: tjeerddie Date: Tue, 3 Oct 2023 14:30:29 +0200 Subject: [PATCH] Fix incorrect if statement and linting error (#249) * Fix linting error * Add on pull_request to github workflows of standalone and surf - fix incorrect if statement. * Restrict on push to main branch * Also run test standalone and test surf on tag create --- .github/workflows/test-standalone.yml | 6 ++++++ .github/workflows/test-surf.yml | 6 ++++++ src/pages/ProcessDetail.tsx | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-standalone.yml b/.github/workflows/test-standalone.yml index 17eddda3e..445905855 100644 --- a/.github/workflows/test-standalone.yml +++ b/.github/workflows/test-standalone.yml @@ -7,7 +7,13 @@ name: Lint and test the GPL version on: push: + branches: + - main + create: + tags: + - '*' workflow_call: + pull_request: jobs: build: diff --git a/.github/workflows/test-surf.yml b/.github/workflows/test-surf.yml index 6e20d2176..071851f4a 100644 --- a/.github/workflows/test-surf.yml +++ b/.github/workflows/test-surf.yml @@ -9,7 +9,13 @@ name: Lint and test the SURF version on: push: + branches: + - main + create: + tags: + - '*' workflow_call: + pull_request: jobs: build: diff --git a/src/pages/ProcessDetail.tsx b/src/pages/ProcessDetail.tsx index 71d3b207e..418f6eca1 100644 --- a/src/pages/ProcessDetail.tsx +++ b/src/pages/ProcessDetail.tsx @@ -79,7 +79,7 @@ function ProcessDetail({ match, query, setQuery }: IProps) { const localTabs = localStepUserInput ? ["user_input", "process"] : ["process"]; const localSelectedTab = localStepUserInput ? "user_input" : "process"; const getProductId = (product: string | { product_id: string }) => - typeof product === 'object' ? product : product.product_id; + typeof product === "object" ? product.product_id : product; const product_id = getProductId(processInstance.product); setProductName(productNameById(product_id, products)); setCustomerName(organisationNameByUuid(processInstance.customer, organisations));