Skip to content

Commit b9c62a3

Browse files
committed
Merge pull request #88 from rkeithhill/rkeithhill/variables-enum-display
Fix for #87, enums display as expandable when they have no properties…
2 parents 2fafc3a + ca11030 commit b9c62a3

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)