Skip to content

Commit d66686d

Browse files
committed
fix(Vdisk): should not fail if no node id passed
1 parent f134c20 commit d66686d

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/containers/Storage/Vdisk/Vdisk.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,18 @@ function Vdisk(props) {
235235
<DiskStateProgressBar
236236
diskAllocatedPercent={vdiskAllocatedPercent}
237237
severity={severity}
238-
href={createHref(
239-
routes.node,
240-
{id: props.NodeId, activeTab: STRUCTURE},
241-
{pdiskId: props.PDisk?.PDiskId, vdiskId: stringifyVdiskId(props.VDiskId)},
242-
)}
238+
href={
239+
props.NodeId
240+
? createHref(
241+
routes.node,
242+
{id: props.NodeId, activeTab: STRUCTURE},
243+
{
244+
pdiskId: props.PDisk?.PDiskId,
245+
vdiskId: stringifyVdiskId(props.VDiskId),
246+
},
247+
)
248+
: undefined
249+
}
243250
/>
244251
</div>
245252
</React.Fragment>

0 commit comments

Comments
 (0)