Skip to content

Commit

Permalink
🐛 fix(Select): Ref cannot be accessed when attach is true
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem committed Jul 1, 2024
1 parent 6f438a6 commit d666911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Masa.Blazor/Components/Select/MSelect.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ private void PrepareMenu()

if ((Attach.IsT0 && string.IsNullOrWhiteSpace(Attach.AsT0)) || (Attach.IsT1 && Attach.AsT1))
{
return Ref.GetSelector();
return Ref.TryGetSelector(out var selector) ? selector : null;
}

return Attach;
Expand Down

0 comments on commit d666911

Please sign in to comment.