I am using the following filter when fetching data from prismic:
prismicC.filter.any(`my.alert.page_type.page`, [
alertData.page,
]),
The filter is working as expected only when "my.alert.page_type.page" field is declared in prismic. How can I modify my filter to make it work (fetch the document) if the field is not defined as well?
I am looking for something simillar to:
const filters: string[] = [
prismicC.filter.or([
prismicC.filter.missing(`my.alert.page_type.page`),
prismicC.filter.any(`my.alert.page_type.page`, [alertData.page]),
]),
];
(or filter does not exist in prismic)
The only solution that I can see right now is to do client side filtering...