Skip to content

Commit

Permalink
Move postfield box check
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn committed Sep 5, 2023
1 parent 0529a51 commit 9031709
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/web/Boxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ function Box(props: BoxProps) {

function PostFieldBox(props: { postField: PostField }) {
const { earlyAdjuncts, arguments: args, lateAdjuncts } = props.postField;
if (earlyAdjuncts.length + args.length + lateAdjuncts.length === 0) {
return undefined;
}
return (
<Box color="#ffcc00" label="Post-field">
{earlyAdjuncts.map((a, i) => (
Expand Down Expand Up @@ -65,7 +62,11 @@ function ClauseBox(props: { clause: BoxClause }) {
<Box color="green" label="Verbal complex">
<div className="boxes-toaq">{verbalComplex}</div>
</Box>
<PostFieldBox postField={postField} />
{postField.earlyAdjuncts.length +
postField.arguments.length +
postField.lateAdjuncts.length ? (
<PostFieldBox postField={postField} />
) : undefined}
</Box>
);
}
Expand Down

0 comments on commit 9031709

Please sign in to comment.