File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ type WorkspaceAgent struct {
59
59
Version string `json:"version"`
60
60
Apps []WorkspaceApp `json:"apps"`
61
61
// DERPLatency is mapped by region name (e.g. "New York City", "Seattle").
62
- DERPLatency map [string ]DERPRegion `json:"latency"`
62
+ DERPLatency map [string ]DERPRegion `json:"latency,omitempty "`
63
63
}
64
64
65
65
type WorkspaceAgentResourceMetadata struct {
Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ export interface WorkspaceAgent {
536
536
readonly directory ?: string
537
537
readonly version : string
538
538
readonly apps : WorkspaceApp [ ]
539
- readonly latency : Record < string , DERPRegion >
539
+ readonly latency ? : Record < string , DERPRegion >
540
540
}
541
541
542
542
// From codersdk/workspaceagents.go
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export interface ResourceAgentLatencyProps {
10
10
11
11
export const ResourceAgentLatency : React . FC < ResourceAgentLatencyProps > = ( props ) => {
12
12
const styles = useStyles ( )
13
- if ( Object . keys ( props . latency ) . length === 0 ) {
13
+ if ( ! props . latency || Object . keys ( props . latency ) . length === 0 ) {
14
14
return null
15
15
}
16
16
return (
You can’t perform that action at this time.
0 commit comments