We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Turtle.get/set_Steps
1 parent 480e8de commit 8b8fe19Copy full SHA for 8b8fe19
Types/Turtle/get_Steps.ps1
@@ -1,4 +1,8 @@
1
-if ($this.'.Steps') {
2
- return $this.'.Steps'
+if (-not $this.'.Steps') {
+ $this.psobject.properties.add(
3
+ [psnoteproperty]::new(
4
+ '.Steps', [Collections.Generic.List[string]]::new()
5
+ ), $false
6
+ )
7
}
-return ,@()
8
+return ,$this.'.Steps'
Types/Turtle/set_Steps.ps1
@@ -11,4 +11,11 @@ param(
11
$Steps
12
)
13
14
-$this | Add-Member -MemberType NoteProperty -Force -Name '.Steps' -Value @($Steps)
15
+ $this | Add-Member -MemberType NoteProperty -Force -Name '.Steps' -Value @(
16
+ [Collections.Generic.List[string]]::new($Steps)
17
18
+} else {
19
+ $this.'.Steps' = $steps
20
+}
21
+
0 commit comments