Skip to content

Commit

Permalink
#2248 After table row is deleted, propertyListener callback has same …
Browse files Browse the repository at this point in the history
…previousValue and value-fixing-unit tests

Signed-off-by: Jerin George <[email protected]>
  • Loading branch information
Jerinjk14 committed Dec 2, 2024
1 parent 8f2d176 commit cecf882
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cecf882

Please sign in to comment.