Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔖 Release 3.0.1 #168

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Our.Umbraco.GMaps.Core/Our.Umbraco.GMaps.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>

<Version>3.0.0</Version>
<Version>3.0.1</Version>
<Authors>Arnold Visser</Authors>
<Company>Arnold Visser</Company>
<Description>Basic Google Maps with autocomplete property editor for Umbraco 8+. This package contains the Core DLL only.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ public override object ConvertIntermediateToObject(IPublishedElement owner, IPub
Map model = null;
if (inter != null)
{
// Handle pre v2.0.0 data.
inter = inter.ToString().ToLower().Replace("google.maps.maptypeid.", string.Empty);
bool legacyData = inter.ToString().Contains("latlng");
var jsonString = inter.ToString();

// Handle pre v2.0.0 data (Removes the prefix 'google.maps.maptypeid.')
jsonString = jsonString.Replace("google.maps.maptypeid.", string.Empty, StringComparison.InvariantCultureIgnoreCase);

bool legacyData = jsonString.Contains("latlng", StringComparison.CurrentCultureIgnoreCase);
if (legacyData)
{
var intermediate = JsonSerializer.Deserialize<LegacyMap>(inter.ToString());
var intermediate = JsonSerializer.Deserialize<LegacyMap>(jsonString);
model = new Map
{
Address = intermediate.Address,
Expand All @@ -51,7 +54,7 @@ public override object ConvertIntermediateToObject(IPublishedElement owner, IPub
}
else
{
model = JsonSerializer.Deserialize<Map>(inter.ToString());
model = JsonSerializer.Deserialize<Map>(jsonString);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Our.Umbraco.GMaps/Our.Umbraco.GMaps.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<IncludeBuildOutput>false</IncludeBuildOutput>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

<Version>3.0.0</Version>
<Version>3.0.1</Version>
<Authors>Arnold Visser</Authors>
<Company>Arnold Visser</Company>
<Description>Basic Google Maps with autocomplete property editor for Umbraco 8+</Description>
Expand Down
Loading