Skip to content

Commit

Permalink
fix: missing readings if pitch accent enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemmmy committed May 20, 2024
1 parent 29ab85f commit 49b2b2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/subject/readings/PitchAccentDiagrams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function PitchAccentDiagrams({ subject }: Props): JSX.Element | n
const data = useMemo(() => getPitchInfosForSubject(database, subject), [subject]);
const style = useStringSetting<AccentDiagramStyle>("pitchAccentDiagramStyle");

if (!data) {
if (!data || !data.length) {
// Fall back to the plain readings if we don't have pitch accent data for this subject
return <PlainPrimaryReadings subject={subject} />;
}
Expand Down

0 comments on commit 49b2b2c

Please sign in to comment.