Skip to content

Commit

Permalink
better lookup for checking if top already exists in the url.
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasSort committed May 3, 2024
1 parent b2c464c commit 62f184d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.0.21</Version>
<Version>10.0.22</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>OData Provider</Title>
<Description>The Odata Provider lets you fetch and map data from or to any OData endpoint.</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/ODataSourceReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ private bool CheckIfEndpointIsReadyForUse(string url)
string checkUrl = url;
if (url.Contains("?"))
{
bool urlContainsTop = url.Contains("&$top=", StringComparison.OrdinalIgnoreCase);
bool urlContainsTop = url.Contains("$top=", StringComparison.OrdinalIgnoreCase);
if (new Uri(url).Query.Any() && !urlContainsTop)
{
checkUrl += "&$top=1";
Expand Down

0 comments on commit 62f184d

Please sign in to comment.