Skip to content

Issue/1801#1900

Open
clinnygee wants to merge 6 commits into
mainfrom
issue/1801
Open

Issue/1801#1900
clinnygee wants to merge 6 commits into
mainfrom
issue/1801

Conversation

@clinnygee
Copy link
Copy Markdown
Collaborator

No description provided.

@clinnygee clinnygee requested a review from leoniedickson April 27, 2026 01:22
Copy link
Copy Markdown
Collaborator

@leoniedickson leoniedickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to have a look at?

removeEmptyAnswers.ts has the same bug

removeEmptyAnswers.ts:146-151 has an identical item reconstruction pattern that also strips definition:

return {
  linkId: qItem.linkId,
  ...(qItem.text && { text: qItem.text }),
  ...(childQrItems.length > 0 && { item: childQrItems }),
  ...(updatedAnswers.length > 0 && { answer: updatedAnswers })
};

getResponse() itself doesn't call removeEmptyAnswersFromResponse, so it's not affected. But removeEmptyAnswersFromResponse is a publicly exported function and a realistic follow-on step — if a caller does removeEmptyAnswersFromResponse(q, getResponse()), definitions get stripped again. The same one-line fix should be applied there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants