Skip to content

Commit

Permalink
Avoid reconstructing handler when it is already available
Browse files Browse the repository at this point in the history
  • Loading branch information
cshung committed Mar 25, 2022
1 parent e09d3f5 commit d1db28c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/src/Platform/ElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ internal static PlatformView ToPlatform(this IElement view)

public static PlatformView ToPlatform(this IElement view, IMauiContext context)
{
var handler = view.ToHandler(context);
var handler = view.Handler ?? view.ToHandler(context);

if (handler.PlatformView is not PlatformView result)
{
Expand Down

0 comments on commit d1db28c

Please sign in to comment.