Skip to content

Commit

Permalink
fix: EZOut StrictMode Tolerance ( Fixes #210 )
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating committed Mar 8, 2024
1 parent 83633b7 commit 4914979
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 6 additions & 2 deletions Commands/Format.PS1XML/Write-FormatListView.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@
elseif ($styleProp -match '\.') {
$targetObject = $psStyle
foreach ($dotProperty in $styleProp -split '(?<!\.)\.') {
if ($targetObject.Item -is [Management.Automation.PSMethodInfo] -or
$targetObject -is [Collections.IDictionary]) {
if (
($targetObject.psobject.Members['Item'] -and
($targetObject.Item -is [Management.Automation.PSMethodInfo])
) -or
$targetObject -is [Collections.IDictionary]
) {
$targetObject = $targetObject[$dotProperty]
} else {
$targetObject = $targetObject.$dotProperty
Expand Down
8 changes: 6 additions & 2 deletions Commands/Format.PS1XML/Write-FormatTableView.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,12 @@ function Write-FormatTableView
elseif ($styleProp -match '\.') {
$targetObject = $psStyle
foreach ($dotProperty in $styleProp -split '(?<!\.)\.') {
if ($targetObject.Item -is [Management.Automation.PSMethodInfo] -or
$targetObject -is [Collections.IDictionary]) {
if (
($targetObject.psobject.Members['Item'] -and
($targetObject.Item -is [Management.Automation.PSMethodInfo])
) -or
$targetObject -is [Collections.IDictionary]
) {
$targetObject = $targetObject[$dotProperty]
} else {
$targetObject = $targetObject.$dotProperty
Expand Down
8 changes: 6 additions & 2 deletions Commands/Format.PS1XML/Write-FormatViewExpression.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,12 @@
elseif ($styleProp -match '\.') {
$targetObject = $psStyle
foreach ($dotProperty in $styleProp -split '(?<!\.)\.') {
if ($targetObject.Item -is [Management.Automation.PSMethodInfo] -or
$targetObject -is [Collections.IDictionary]) {
if (
($targetObject.psobject.Members['Item'] -and
($targetObject.Item -is [Management.Automation.PSMethodInfo])
) -or
$targetObject -is [Collections.IDictionary]
) {
$targetObject = $targetObject[$dotProperty]
} else {
$targetObject = $targetObject.$dotProperty
Expand Down

0 comments on commit 4914979

Please sign in to comment.