@overmap-ai/core 1.0.63-form-submission-fix.3 → 1.0.63-minor-improvements.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2594,8 +2594,10 @@ const selectAttachedFormSubmissionsOfIssue = restructureCreateSelectorWithArgs(
2594
2594
  ],
2595
2595
  (issues, forms, formRevisions, submissions, issueId) => {
2596
2596
  const issue = issues[issueId];
2597
- if (!issue || !issue.issue_type) {
2597
+ if (!issue)
2598
2598
  return [];
2599
+ if (!issue.issue_type) {
2600
+ return Object.values(submissions).filter((submission) => submission.issue === issueId);
2599
2601
  }
2600
2602
  const issueTypeForms = new Set(
2601
2603
  Object.keys(forms).filter((formId) => forms[formId].issue_type === issue.issue_type)
@@ -2650,8 +2652,10 @@ const selectAttachedFormSubmissionsOfAsset = restructureCreateSelectorWithArgs(
2650
2652
  ],
2651
2653
  (assets, forms, formRevisions, submissions, assetId) => {
2652
2654
  const asset = assets[assetId];
2653
- if (!asset || !asset.asset_type) {
2655
+ if (!asset)
2654
2656
  return [];
2657
+ if (!asset.asset_type) {
2658
+ return Object.values(submissions).filter((submission) => submission.asset === assetId);
2655
2659
  }
2656
2660
  const issueTypeForms = new Set(
2657
2661
  Object.keys(forms).filter((formId) => forms[formId].asset_type === asset.asset_type)