Skip to content

Commit

Permalink
Don't display button when the URL is an empty string (#239)
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler authored Jan 5, 2025
1 parent df2a202 commit 2c6727b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions OrcanodeMonitor/Pages/NodeEvents.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using OrcanodeMonitor.Core;
using OrcanodeMonitor.Data;
using OrcanodeMonitor.Models;
using static OrcanodeMonitor.Core.Fetcher;

namespace OrcanodeMonitor.Pages
{
Expand Down Expand Up @@ -82,7 +81,7 @@ public string GetEventClasses(OrcanodeEvent item)

public string GetEventButtonStyle(OrcanodeEvent item)
{
if ((item.Type == OrcanodeEventTypes.HydrophoneStream) && (item.Url != null))
if ((item.Type == OrcanodeEventTypes.HydrophoneStream) && !string.IsNullOrEmpty(item.Url))
{
return "display: inline-block;";
}
Expand Down

0 comments on commit 2c6727b

Please sign in to comment.