Skip to content

Commit

Permalink
Update disklist.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fishylunar committed Aug 25, 2023
1 parent 461ab8c commit f6acb97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/🐟/disklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class Disklist {

// If driveArray is empty, throw error
if (driveArray.length == 0) {
throw new Error("No drives found");
return { info: "No drives found." }
}
// If only one drive in array, return the object instead of an array with only one item
if (driveArray.length == 1) {
Expand Down Expand Up @@ -76,7 +76,7 @@ export default class Disklist {

// If driveArray is empty, throw error
if (driveArray.length == 0) {
throw new Error("No drives found");
return { info: "No drives found." };
}
// If only one drive in array, return the object instead of an array with only one item
if (driveArray.length == 1) {
Expand Down

0 comments on commit f6acb97

Please sign in to comment.