Skip to content

Commit

Permalink
Sonar cloud improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rugoncalves committed Oct 7, 2024
1 parent cd43b82 commit 41b0a38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/OutSystems/Maps/MapAPI/MarkerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,15 @@ namespace OutSystems.Maps.MapAPI.MarkerManager {
// Get all maps
const allMaps = [...MapManager.GetMapsFromPage().values()];

// On each map, look for all drawingTools and on each one look, on the createdElements array, for the markerId passed
// On each map, look for all drawingTools and on each one look,
// on the createdElements array, for the markerId passed.
allMaps.find((map: OSFramework.Maps.OSMap.IMap) => {
return (marker =
map.drawingTools &&
(map.drawingTools.createdElements.find((marker: OSFramework.Maps.Marker.IMarker) =>
marker.equalsToID(markerId)
) as OSFramework.Maps.Marker.IMarker));
if (map.drawingTools) {
marker = map.drawingTools.createdElements.find(
(marker: OSFramework.Maps.Marker.IMarker) => marker && marker.equalsToID(markerId)
) as OSFramework.Maps.Marker.IMarker;
}
return marker;
});

// If still wasn't found, then it does not exist and throw error
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/Maps/Google/Marker/DeprecatedMarker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Provider.Maps.Google.Marker {
>
implements IMarkerGoogle
{
private _addedEvents: Array<string>;
private readonly _addedEvents: Array<string>;

constructor(
map: OSFramework.Maps.OSMap.IMap,
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/Maps/Google/Marker/Marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Provider.Maps.Google.Marker {
>
implements IMarkerGoogle
{
private _addedEvents: Array<string>;
private readonly _addedEvents: Array<string>;

constructor(
map: OSFramework.Maps.OSMap.IMap,
Expand Down

0 comments on commit 41b0a38

Please sign in to comment.