Skip to content

Commit 815d629

Browse files
Fix IsNullOrEmptyStateTrigger for Uno to consider FEs as non-empty (#452)
* Fix `IsNullOrEmptyStateTrigger` for Uno to consider FEs as non-empty * Added regression tracking for workaround * Fix build error --------- Co-authored-by: Arlo <arlo.godfrey@outlook.com>
1 parent 0bab2c0 commit 815d629

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/Triggers/src/IsNullOrEmptyStateTrigger.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,13 @@ private static bool IsNullOrEmpty(object val)
117117
}
118118

119119
// Object is not an ICollection, check for an empty IEnumerable
120-
var valEnumerable = val as IEnumerable;
121-
if (valEnumerable != null)
120+
if (val is IEnumerable valEnumerable
121+
// Workaround to regression introduced in https://github.com/unoplatform/uno/pull/16834
122+
// Track https://github.com/unoplatform/uno/issues/17311 for cleanup
123+
#if HAS_UNO
124+
&& val is not FrameworkElement
125+
#endif
126+
)
122127
{
123128
foreach (var item in valEnumerable)
124129
{

0 commit comments

Comments
 (0)