Skip to content

Commit

Permalink
refactor error code to a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Mar 28, 2017
1 parent a9992bc commit 375ad89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/api/entities/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ export default {
filesToDelete = filesToDelete.filter((doc, index) => filesToDelete.indexOf(doc) === index);
return deleteFiles(filesToDelete)
.catch((error) => {
if (error.errno === -2) {
const fileNotExist = -2;
if (error.errno === fileNotExist) {
return Promise.resolve();
}

Expand Down

0 comments on commit 375ad89

Please sign in to comment.