Skip to content

Commit

Permalink
Check for empty glosses (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored Aug 17, 2020
1 parent e816177 commit d72f86d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ExistingDataTable extends React.Component<ExistingDataTableProps> {
<ImmutableExistingData
key={domainWord.word.id}
vernacular={domainWord.word.vernacular}
gloss={domainWord.gloss.def}
gloss={domainWord.gloss ? domainWord.gloss.def : ""}
/>
))}
</List>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from "react";
import { Grid, Typography } from "@material-ui/core";

interface ImmutableExistingDataProps {
vernacular: string;
gloss: string;
vernacular?: string;
gloss?: string;
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/types/word.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export function multiGlossWord(vern: string, glosses: string[]): Word {

export function testWordList(): Word[] {
return [
{ ...simpleWord("NoSense", ""), senses: [] },
simpleWord("Yoink", "Hello"),
simpleWord("Yode", "Goodbye"),
simpleWord("Yoff", "Yes"),
Expand Down

0 comments on commit d72f86d

Please sign in to comment.