From d1ddd9cbe79cbcf167521406242cea006ad19e34 Mon Sep 17 00:00:00 2001 From: Jacob Bare Date: Thu, 11 Dec 2025 13:24:37 -0600 Subject: [PATCH] Include values for boolean (type 5) demographics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since these also use value identifiers for “yes” and “no” values. --- packages/api-client/src/entities/brand/demographic.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/api-client/src/entities/brand/demographic.js b/packages/api-client/src/entities/brand/demographic.js index 2584293..e84e277 100644 --- a/packages/api-client/src/entities/brand/demographic.js +++ b/packages/api-client/src/entities/brand/demographic.js @@ -9,7 +9,8 @@ const builder = ({ name, value, parent }) => { // force an empty array for non-choice demographics. // the Omeda API returns an array with a single value object, containing // an Id of 0 (which is invalid) - if (![1, 2].includes(parent.DemographicType)) return []; + // also include boolean values (type 5) since these also use value IDs + if (![1, 2, 5].includes(parent.DemographicType)) return []; return asArray(value).map((obj) => new DemographicValue(obj)); } return null;