Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Updated error message for trying to delete without an active textbox
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIceCreamTroll committed Nov 30, 2021
1 parent 51ac1d3 commit e25b4c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/listmaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ function loadFileList(directoryPath) {

function deleteRow(filename) {
try {
if (filename == undefined) {
UpdateMessageBar("Nothing was selected so nothing was deleted.");
return;
}
fs.unlinkSync(path.join(directoryPath, filename));
loadFileList(directoryPath);
saveTranscriptionAsText();
Expand Down

0 comments on commit e25b4c2

Please sign in to comment.