micharied / flashcard-from-headline-to-body

This is a plugin for remnote, which moves the secod site of a flashcard from the headline to the body in the detail rem view.
MIT License
0 stars 1 forks source link

Don't render widget if the document Rem doesn't have backText #3

Open bjsi opened 2 years ago

bjsi commented 2 years ago

https://github.com/micharied/flashcard-from-headline-to-body/blob/6729f0fa49bfd98305b9f5329af2d23a737bcdc9/src/widgets/flashcard_from_headline_to_body.tsx#L10-L16

Add something like:

if (rem?.backText.length === 0) {
  return null;
}

At the moment it shows the definition widget even if the Rem has no backText

image

mfranzs commented 2 years ago

(This is a really clever plugin by the way!)