From 56e7bd9d4d744c9f281d6efdf94d474e3293f42d Mon Sep 17 00:00:00 2001 From: soyuka Date: Sat, 9 Nov 2024 10:40:18 +0100 Subject: [PATCH] fix tests --- .github/workflows/storybook.yml | 9 ++++++--- src/hydra/dataProvider.ts | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index e2d10804..3ba4cc3c 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -32,9 +32,12 @@ jobs: compose.yaml compose.ci.yaml set: | - *.cache-from=type=gha,scope=${{github.ref}} - *.cache-from=type=gha,scope=refs/heads/main - *.cache-to=type=gha,scope=${{github.ref}},mode=max + php.cache-from=type=gha,scope=php-${{github.ref}} + php.cache-from=type=gha,scope=php-refs/heads/main + php.cache-to=type=gha,scope=php-${{github.ref}},mode=max + pwa.cache-from=type=gha,scope=pwa-${{github.ref}} + pwa.cache-from=type=gha,scope=pwa-refs/heads/main + pwa.cache-to=type=gha,scope=pwa-${{github.ref}},mode=max - name: Start services run: docker compose -f compose.yaml -f compose.ci.yaml up --wait --no-build diff --git a/src/hydra/dataProvider.ts b/src/hydra/dataProvider.ts index d29eff35..385cc405 100644 --- a/src/hydra/dataProvider.ts +++ b/src/hydra/dataProvider.ts @@ -364,7 +364,7 @@ function dataProvider( extraInformation = params.meta; } - const apiResource = apiSchema.resources.find( + const apiResource = (apiSchema?.resources ?? []).find( ({ name }) => resource === name, );