Do not throw exceptions for empty markup

This commit is contained in:
Oleksandr Liakhevych 2022-04-28 00:23:10 +03:00
Родитель a14bbc46d7
Коммит 76860277d9
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -79,7 +79,7 @@ namespace Microsoft.MobileBlazorBindings.Core
{
handleChildContentText.HandleText(edit.SiblingIndex, frame.TextContent);
}
else
else if (!string.IsNullOrWhiteSpace(frame.TextContent))
{
throw new Exception("Cannot set text content on child that doesn't handle inner text content.");
}
@ -102,7 +102,7 @@ namespace Microsoft.MobileBlazorBindings.Core
{
handleChildContentText.HandleText(edit.SiblingIndex, frame.MarkupContent);
}
else
else if (!string.IsNullOrWhiteSpace(frame.MarkupContent))
{
throw new Exception("Cannot set markup content on child that doesn't handle inner text content.");
}