diff --git a/canvas_modules/common-canvas/src/common-properties/properties-controller.js b/canvas_modules/common-canvas/src/common-properties/properties-controller.js index d29b03111..e9090f77c 100644 --- a/canvas_modules/common-canvas/src/common-properties/properties-controller.js +++ b/canvas_modules/common-canvas/src/common-properties/properties-controller.js @@ -1116,16 +1116,14 @@ export default class PropertiesController { getPropertyValue(inPropertyId, options, defaultValue) { const propertyId = this.convertPropertyId(inPropertyId); const propertyValue = this.propertiesStore.getPropertyValue(propertyId); - // Parsing propertyValue let parsedValue; if (Array.isArray(propertyValue)) { - // Use map to preserve sparse arrays and maintain structure parsedValue = propertyValue.map((itm) => itm); } else if (propertyValue && typeof propertyValue === "object") { // Shallow copy for objects parsedValue = { ...propertyValue }; } else { - parsedValue = typeof propertyValue !== "undefined" ? propertyValue : defaultValue; + parsedValue = propertyValue; } let filteredValue = defaultValue;