Skip to content

Commit

Permalink
Links are not always defined, check before using (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekacnet authored Aug 17, 2024
1 parent 75a27ff commit 1661016
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Start grafana docker
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: docker-compose up -d
run: docker compose up -d

- name: Run e2e tests
id: run-e2e-tests
Expand All @@ -94,7 +94,7 @@ jobs:

- name: Stop grafana docker
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: docker-compose down
run: docker compose down

- name: Sign plugin
run: npm run sign
Expand Down
4 changes: 2 additions & 2 deletions src/components/DataLinksEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const DataLinkEditorWarning: React.FC<{
}> = ({ links}) => {
let msg = "";
let prefix ="";
if (links.length > 1) {
if (links && links.length > 1) {
prefix ="⚠"
msg = "more than one link is not supported for cubism";
} else if (links.length === 1) {
} else if (links && links.length === 1) {
let url = links[0].url
const pattern = /\${[^}]*}/g;
const extractedVariables: string[] = url.match(pattern)!;
Expand Down

0 comments on commit 1661016

Please sign in to comment.