fix
This commit is contained in:
@@ -299,7 +299,7 @@ export default function CmsPage() {
|
|||||||
const fieldValues = res.data?.data?.fieldValues || res.data?.data || [];
|
const fieldValues = res.data?.data?.fieldValues || res.data?.data || [];
|
||||||
for (const fv of fieldValues) {
|
for (const fv of fieldValues) {
|
||||||
const slug: string = (fv.fieldSlug || fv.field?.slug || '').toLowerCase();
|
const slug: string = (fv.fieldSlug || fv.field?.slug || '').toLowerCase();
|
||||||
const value = fv.value ?? fv.jsonValue ?? fv.textValue;
|
const value = fv.valueLabel ?? fv.value ?? fv.jsonValue ?? fv.textValue;
|
||||||
if (value == null || value === '') continue;
|
if (value == null || value === '') continue;
|
||||||
|
|
||||||
// Location: city/state fields
|
// Location: city/state fields
|
||||||
@@ -368,7 +368,7 @@ export default function CmsPage() {
|
|||||||
const fieldValues = res.data?.data?.fieldValues || res.data?.data || [];
|
const fieldValues = res.data?.data?.fieldValues || res.data?.data || [];
|
||||||
for (const fv of fieldValues) {
|
for (const fv of fieldValues) {
|
||||||
const slug: string = (fv.fieldSlug || fv.field?.slug || '').toLowerCase();
|
const slug: string = (fv.fieldSlug || fv.field?.slug || '').toLowerCase();
|
||||||
const value = fv.value ?? fv.jsonValue ?? fv.textValue;
|
const value = fv.valueLabel ?? fv.value ?? fv.jsonValue ?? fv.textValue;
|
||||||
if (value == null || value === '') continue;
|
if (value == null || value === '') continue;
|
||||||
|
|
||||||
if ((slug === 'city' || slug === 'state') && !location) {
|
if ((slug === 'city' || slug === 'state') && !location) {
|
||||||
|
|||||||
Reference in New Issue
Block a user