Skip to content

Commit

Permalink
fix: PipeScript.Module.WebSite.GetDefaultLayout ( Fixes #1058 )
Browse files Browse the repository at this point in the history
Simplifying implementation
  • Loading branch information
James Brundage committed Mar 24, 2024
1 parent 2256892 commit 24ef4af
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Types/PipeScript.Module.Website/GetDefaultLayout.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
param()

$this | . {
param(
[Parameter(ValueFromPipelineByPropertyName)]
[Alias('DefaultLayout','BaseLayout')]
[string]
$Layout = 'Default'
)

process { $Layout }
foreach ($potentialPropertyName in 'DefaultLayout','BaseLayout','Layout','Type') {
if ($this.$potentialPropertyName) {
return $this.$potentialPropertyName
}
}

return $null

0 comments on commit 24ef4af

Please sign in to comment.