Skip to content

Commit

Permalink
PharmaLedger-IMI/epi-workspace#1059 return from BrickMap.delete metho…
Browse files Browse the repository at this point in the history
…d if the record does not exist
  • Loading branch information
skutner committed Dec 15, 2022
1 parent d7ff5fb commit abef60e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/BrickMapMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ const BrickMapMixin = {
barPath = pskPath.normalize(barPath);
const childNode = this.getDeepestNode(barPath);
if (!childNode) {
throw new Error(`Unable to delete <${barPath}>. File or directory not found.`);
return;
}
if (this.nodeIsDeleted(childNode)) {
throw new Error(`Unable to delete <${barPath}>. File or directory already deleted.`);
return;
}

this.deleteNode(childNode);
Expand Down

0 comments on commit abef60e

Please # to comment.