Skip to content

Commit 26d38cc

Browse files
Update Engine/Settings.cs
1 parent 16f6601 commit 26d38cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Engine/Settings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,9 @@ internal static SettingsMode FindSettingsMode(object settings, string path, out
499499
var settingsMode = SettingsMode.None;
500500

501501
// if the provided settings argument is wrapped in an expressions then PowerShell resolves it but it will be of type PSObject and we have to operate then on the BaseObject
502-
if (settings is PSObject)
502+
if (settings is PSObject settingsFoundPSObject)
503503
{
504-
settings = ((PSObject)settings).BaseObject;
504+
settings = settingsFoundPSObject.BaseObject;
505505
}
506506

507507
settingsFound = settings;

0 commit comments

Comments
 (0)