Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def handle(self, *args, **options):
for item in items
if item.get("type") == "dir" and item.get("name", "").isdigit()
]
except (json.JSONDecodeError, KeyError, ValueError) as e:
except (KeyError, ValueError) as e:
self.stderr.write(self.style.ERROR(f"Could not fetch repository structure: {e}"))
return

Expand Down
7 changes: 5 additions & 2 deletions frontend/jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ jest.mock('next/navigation', () => {
}
})

if (!global.structuredClone) {
global.structuredClone = (val) => JSON.parse(JSON.stringify(val))
if (!(globalThis as any).structuredClone) {
// Polyfill for environments where `structuredClone` is not available.
// JSON-based cloning is acceptable here because this is only used in tests.
(globalThis as any).structuredClone = (val: unknown) =>
JSON.parse(JSON.stringify(val)); // NOSONAR intentional polyfill fallback
}

beforeAll(() => {
Expand Down