How to use isFilled helper function in Nuxt 3?

Hi, I'm trying to use isFilled helper function described in client helpers docs, but it looks it does not exist anymore, or I don't know how to use it.

I've tried to load it from the usePrismic composable but there is nothing inside with that name.
Also tried to use it directly in the template as $prismic.isFilled.keyText(field) with no luck, isFilled doesn't exist inside that object.

It should be great to have this helper, checking for empty fields is kind of a nightmare in Prismic :sweat_smile:

Thank you!

Hello Sergio,

Thanks for reaching out to us.

This is an expected behavior with nuxt/prismic. * @nuxtjs/prismic doesn't include the client helper functions. You need to apply your own functions to check for empty fields.

However, I will pass your feedback to my dedicated team.


1 Like

Hi Priyanka,

Thank you for your quick reply, as always.

I understand this is an expected behavior, but, what is the reason behind it?
I mean, prismic-client is already a dependency of @nuxtjs/prismic, so it would be awesome to use that helper since it's something I have to check in every template.

Now $prismic helpers like asText or others are exposed on this, but not the one we are talking about, so it would be helpful to expose it too. Anyway, maybe I can just import that helper to use myself. I didn't know about them, I always use my own check functions, but since I saw you have them already, I think it's better if Prismic is the owner of this helper, since only you know if something changes.

Thank you!