File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change 19
19
-->
20
20
21
21
## Upcoming Release
22
+ * Fixed null reference bug for ` Get-AzMetric ` when ` ResultType ` set to "Metadata"
22
23
* Fixed bug for ` Add-AzAutoscaleSetting ` not able to pipe result from ` Get-AzAutoscaleSetting ` [ #13861 ]
23
24
24
25
## Version 2.5.0
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public PSMetric(Metric metric)
62
62
this . Unit = metric . Unit ;
63
63
this . Id = metric . Id ;
64
64
this . Type = metric . Type ;
65
- this . Data = ( ( metric . Timeseries != null && metric . Timeseries . Count > 0 ) ? new PSMetricValuesCollection ( metric . Timeseries [ 0 ] . Data ) : null ) ;
65
+ this . Data = ( ( metric . Timeseries != null && metric . Timeseries . Count > 0 && metric . Timeseries [ 0 ] . Data != null ) ? new PSMetricValuesCollection ( metric . Timeseries [ 0 ] . Data ) : null ) ;
66
66
this . Timeseries = metric . Timeseries ;
67
67
}
68
68
}
You can’t perform that action at this time.
0 commit comments