Skip to content

Commit

Permalink
fix empty recipe description
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Dec 31, 2024
1 parent 873e5bd commit f49fad1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,15 @@ function PreludeSection({ recipe }: { recipe: Recipe }) {
const { prelude } = hooks.useWatch(recipe);
hooks.useWatch(prelude);

if (prelude.get('content')?.length === 0) {
const empty =
!prelude ||
!prelude.get('content') ||
prelude
.get('content')
.getSnapshot()
.every((p: any) => !p.content);

if (empty) {
return null;
}

Expand Down

0 comments on commit f49fad1

Please sign in to comment.