CEC-4745: add vins nullcheck for bulk actions bulk actions (#395)

* nullcheck bulk actions

* remove unused var

* update snapshots
This commit is contained in:
Tristan Timblin
2023-07-18 17:19:49 -04:00
committed by jwu-fisker
parent 27c59878f4
commit 150bb1c534
3 changed files with 3 additions and 79 deletions

View File

@@ -46,7 +46,7 @@ export default function BulkActions({
const payload = {
vins,
vinCSV: vins.join(", "),
vinCSV: (vins && vins.length > 0) ? vins.join(", ") : "N/A",
ref: activeRef
};
@@ -63,6 +63,8 @@ export default function BulkActions({
setTitle(filteredActions.find((action) => active === action.id)?.name || "Action");
}, [active, filteredActions]);
if (!vins || vins.length === 0) return <></>;
return (
<>
<DropDownButton actions={filteredActions} />