Skip to content

Commit

Permalink
fix(dataset editor): Infinite spinner when latest annex has no datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
strogonoff committed May 28, 2020
1 parent 1384da7 commit 6f55ac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/issue-editor/message-forms/amendment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const MessageForm: React.FC<MessageFormProps> = function ({ message, onCh
<{ pubID: string, asOfIssueID: number, excluding: boolean }, { annex: RunningAnnex | undefined | null }>
('model-issues-get-latest-annex', { annex: undefined }, { pubID: msg.target.publication, asOfIssueID: issue.id, excluding: false });

const latestAnnexedDatasets = latestAnnex.value.annex?.annexedTo.annexes[msg.target.publication]?.datasets;
const latestAnnexedDatasets = latestAnnex.value.annex?.annexedTo.annexes[msg.target.publication]?.datasets || null;

const contentsEditor = <FreeformContents
defaultValue={(msg.contents || {})[lang.default] || {}}
Expand Down

0 comments on commit 6f55ac3

Please sign in to comment.