Skip to content

Commit 5e32376

Browse files
committed
Merge branch 'master' into rkeithhill/variables-psobject-fixes
2 parents 8a98add + b9c62a3 commit 5e32376

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/PowerShellEditorServices/Debugging/VariableDetails.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ private static bool GetIsExpandable(object valueObject)
130130
return
131131
valueObject != null &&
132132
!valueType.IsPrimitive &&
133+
!valueType.IsEnum && // Enums don't have any properties
134+
!(valueObject is string) && // Strings get treated as IEnumerables
133135
!(valueObject is decimal) &&
134-
!(valueObject is UnableToRetrievePropertyMessage) &&
135-
!(valueObject is string); // Strings get treated as IEnumerables
136+
!(valueObject is UnableToRetrievePropertyMessage);
136137
}
137138

138139
private static string GetValueString(object value, bool isExpandable)

0 commit comments

Comments
 (0)