File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 784
784
"remove_bom" : " Remove BOM" ,
785
785
"removing_dependencies" : " Removing dependencies, {n} left" ,
786
786
"bom_deleted" : " BOM successfully deleted" ,
787
+ "no_bom_available" : " No BOM exists for project" ,
787
788
"reported_by" : " Reported By" ,
788
789
"required_component_identifier" : " A component identifier is required" ,
789
790
"required_component_name" : " The component name is required" ,
Original file line number Diff line number Diff line change @@ -441,6 +441,7 @@ export default {
441
441
// Step 2: Delete dependencies in batches
442
442
let batchSize = 50 ;
443
443
let lengthAllDependencies = allDependencies .length ;
444
+ if (lengthAllDependencies !== 0 ) {
444
445
for (let i = 0 ; i < allDependencies .length ; i += batchSize) {
445
446
let batch = allDependencies .slice (i, i + batchSize);
446
447
this .$toastr .s (this .$t (" message.removing_dependencies" , { n: lengthAllDependencies }));
@@ -455,6 +456,10 @@ export default {
455
456
this .$toastr .s (this .$t (" message.bom_deleted" ));
456
457
// Step 4: Refresh the table
457
458
this .$refs .table .removeAll ();
459
+ }
460
+ else {
461
+ this .$toastr .w (this .$t (" message.no_bom_available" ));
462
+ }
458
463
} catch (error) {
459
464
this .$toastr .w (this .$t (" condition.unsuccessful_action" ));
460
465
}
You can’t perform that action at this time.
0 commit comments