Skip to content

Commit

Permalink
refactor promise chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Farfurix committed Jun 28, 2019
1 parent 5dfa673 commit 9e4d334
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/request-pipeline/file-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ export default class FileRequest extends EventEmitter {
.then((stats: fs.Stats) => {
if (!stats.isFile())
throw new Error(TARGET_IS_NOT_FILE);

return access(this.path, fs.constants.R_OK);
})
.then(() => access(this.path, fs.constants.R_OK))
.then(() => this._onOpen())
.catch((err: Error) => {
const asarArchivePath = getParentAsarArchivePath(this.path);
Expand Down

0 comments on commit 9e4d334

Please sign in to comment.