Skip to content

Commit

Permalink
fix bad logic (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 authored May 15, 2021
1 parent ca9b8eb commit a89e99d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cli/src/plugins/resource/plugin-user-workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ class UserWorkspaceResource extends ResourceInterface {

async shouldResolve(url = '/') {
const bareUrl = this.getBareUrlPath(url);
const isWorkspaceFile = fs.existsSync(path.join(this.compilation.context.userWorkspace, bareUrl));

return Promise.resolve(fs.existsSync(this.compilation.context.userWorkspace, bareUrl) || bareUrl === '/');
return Promise.resolve(isWorkspaceFile || bareUrl === '/');
}

async resolve(url = '/') {
Expand Down

0 comments on commit a89e99d

Please sign in to comment.