Skip to content

Conversation

@Harsha707
Copy link

@Harsha707 Harsha707 commented Sep 16, 2024

Pull Request Description:

This PR fixes an issue in the DuplicateDocument component where optional fields such as localized, required, and name were accessed without checks, causing potential errors.

Since there is no backend endpoint to handle this, unlike in V3, the issue needs to be addressed in the frontend. This PR mirrors the behavior from V3 by safely checking for these optional fields before accessing them.

Key Changes:

  • Added checks to ensure fields like localized and required are accessed only if they exist.
  • Safely handled the name field, preventing errors when it's not defined.
  • Ensures document duplication works properly even when these fields are missing.

This solution mimics V3 functionality and ensures robust duplication handling on the frontend in the absence of a backend solution.

Fixes #7270

@DanRibbens DanRibbens added the keep Prevents from being marked stale or auto-closed. label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keep Prevents from being marked stale or auto-closed. stale v2

3 participants