Skip to content

Commit

Permalink
ROU-4864: Change the approach to update values on provider's configs
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarcelino-fe committed Apr 17, 2024
1 parent 7295e78 commit 8519b46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/OSFramework/Maps/OSMap/AbstractMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@ namespace OSFramework.Maps.OSMap {
public changeProperty(propertyName: string, propertyValue: unknown): void {
//Update Map's config when the property is available
if (this.config.hasOwnProperty(propertyName)) {
const propName = Maps.Enum.OS_Config_Map[propertyName];

// Check if is an object to parse the correct value
if (typeof this.config[propertyName] === 'object') {
// Check if the property value is offset or localization to parse the value
if (propName === Maps.Enum.OS_Config_Map.offset || propName === Maps.Enum.OS_Config_Map.localization) {
propertyValue = JSON.parse(propertyValue as string);
}

Expand Down

0 comments on commit 8519b46

Please sign in to comment.