diff --git a/kube/configs/api-beta.pdb.yaml b/kube/configs/api-beta.pdb.yaml index 0520f8a54..d68c7460a 100644 --- a/kube/configs/api-beta.pdb.yaml +++ b/kube/configs/api-beta.pdb.yaml @@ -7,4 +7,3 @@ spec: selector: matchLabels: app: rs-api-beta - diff --git a/kube/configs/api.pdb.yaml b/kube/configs/api.pdb.yaml index e5b9ca283..5cc51d670 100644 --- a/kube/configs/api.pdb.yaml +++ b/kube/configs/api.pdb.yaml @@ -7,4 +7,3 @@ spec: selector: matchLabels: app: rs-api - diff --git a/kube/configs/browserless.pdb.yaml b/kube/configs/browserless.pdb.yaml index 90a1dd2e5..ec3ed20db 100644 --- a/kube/configs/browserless.pdb.yaml +++ b/kube/configs/browserless.pdb.yaml @@ -7,4 +7,3 @@ spec: selector: matchLabels: app: rs-browserless - diff --git a/packages/backend/src/routes/data.js b/packages/backend/src/routes/data.js index 840c93b38..2e04caf8f 100644 --- a/packages/backend/src/routes/data.js +++ b/packages/backend/src/routes/data.js @@ -755,7 +755,7 @@ router.post( const grabFieldText = (field) => { if (!field) return ""; - if (field.li) { + if (field.li && Array.isArray(field.li)) { return field.li.map((item) => item._text).join("\n"); } @@ -765,7 +765,7 @@ router.post( const grabLabelTitles = (field) => { if (!field) return []; if (field._text) return [Util.cleanLabelTitle(field._text)]; - if (field.length) + if (Array.isArray(field) && field.length) return field.map((item) => Util.cleanLabelTitle(item._text)); return []; @@ -777,7 +777,7 @@ router.post( let originalPaths; if (field.path?._text || field._text) originalPaths = [field.path?._text || field._text]; - if (field.length) + if (Array.isArray(field) && field.length) originalPaths = field.map((item) => item.path?._text || item._text); if (!originalPaths) return [];